tsc gives 'Duplicate identifier' error messages (@openui5/[email protected])
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- tooling
Research direction
Reproduce the report with the shown tsconfig.json, empty.js, TypeScript 4.3.5, and @openui5/[email protected]. Inspect the duplicate declarations in types/sap.m.d.ts, types/sap.ui.commons.d.ts, and types/sap.ui.core.d.ts, then compare how the configured type libraries are loaded. Done means the minimal tsc run no longer reports these duplicate identifier errors.
Written by the indexing model from the issue text.
Description
When running tsc on an empty JavaScript file it gives the following error messages:
$ ./node_modules/typescript/bin/tsc
node_modules/@openui5/ts-types/types/sap.m.d.ts:301:15 - error TS2300: Duplicate identifier 'MessageBox'.
301 namespace MessageBox {
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.m.d.ts:24179:15 - error TS2300: Duplicate identifier 'MessageBox'.
24179 interface MessageBox {
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.m.d.ts:24868:11 - error TS2300: Duplicate identifier 'MessageBox'.
24868 const MessageBox: MessageBox;
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.commons.d.ts:3401:17 - error TS2300: Duplicate identifier 'MessageBox'.
3401 namespace MessageBox {
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.commons.d.ts:6401:17 - error TS2300: Duplicate identifier 'MessageBox'.
6401 interface MessageBox {
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.commons.d.ts:6526:13 - error TS2300: Duplicate identifier 'MessageBox'.
6526 const MessageBox: MessageBox;
~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:37617:19 - error TS2300: Duplicate identifier 'odata4analytics'.
37617 namespace odata4analytics {
~~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:39118:19 - error TS2300: Duplicate identifier 'odata4analytics'.
39118 interface odata4analytics {
~~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:39133:15 - error TS2300: Duplicate identifier 'odata4analytics'.
39133 const odata4analytics: odata4analytics;
~~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:58425:15 - error TS2300: Duplicate identifier 'Device'.
58425 namespace Device {
~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:59682:19 - error TS2300: Duplicate identifier 'dataTableUtils'.
59682 namespace dataTableUtils {
~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:59750:19 - error TS2300: Duplicate identifier 'dataTableUtils'.
59750 interface dataTableUtils {
~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:59826:15 - error TS2300: Duplicate identifier 'dataTableUtils'.
59826 const dataTableUtils: dataTableUtils;
~~~~~~~~~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:63827:15 - error TS2300: Duplicate identifier 'Device'.
63827 interface Device {}
~~~~~~
node_modules/@openui5/ts-types/types/sap.ui.core.d.ts:63828:11 - error TS2300: Duplicate identifier 'Device'.
63828 const Device: Device;
~~~~~~
Found 15 errors.
$ cat tsconfig.json
{
"compilerOptions": {
"incremental": true,
"noImplicitAny": false,
"noImplicitReturns": true,
"noImplicitThis": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": false,
"strictNullChecks": false,
"allowJs": true,
"checkJs": true,
"module": "ESNext",
"target": "ES2020",
"types": ["@openui5/ts-types", "@types/qunit", "@types/jquery"],
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"lib": ["dom","es7"]
},
"include": [
"./empty.js"
]
}
$ npm list
[email protected] /Users/myuser/Documents/my_fiori
├── @openui5/[email protected]
├─┬ @types/[email protected]
│ └── @types/[email protected]
├── @types/[email protected]
└── [email protected]
- Dominant language
- TypeScript
- Stars
- 213
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from UI5/typescript
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
UI5/typescript#625 · 4 comments ·
-
dts-generator
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
UI5/typescript#529 · 3 comments ·
-
Dependency DashboardOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
UI5/typescript#587 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
UI5/typescript#532 ·
-
enhancement ts-interface-generator
Difficulty 5/5 Over a week Newbie friendliness 30/100
UI5/typescript#524 ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
eliasstravik/herdr-projects#1700 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Koenkk/zigbee2mqtt#33890 ·
Maintainers usually reply within 1 day
-
[bug] Socrates launchd-path adapter throws EISDIR when an import names a folder beside its .ts fileOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
danielmiessler/LifeOS#3123 ·
Maintainers usually reply within 5 days
-
[Feature]: Skill Workshop skill diet should use the configured utility model, not always the primaryOpenclawsweeper:fix-shape-clear clawsweeper:needs-live-repro clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr impact:auth-provider issue-rating: 🐚 platinum hermit P2
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
openclaw/openclaw#210348 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day