Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples generated by yo can not be used nor built #14431

Closed
cbries opened this issue Nov 11, 2024 · 11 comments · Fixed by #14435
Closed

samples generated by yo can not be used nor built #14431

cbries opened this issue Nov 11, 2024 · 11 comments · Fixed by #14435

Comments

@cbries
Copy link

cbries commented Nov 11, 2024

Bug Description:

The samples generated by yo can not be used nor built.
Upgrade of yo has been done via:
npm update -g yo generator-theia-extension

Steps to Reproduce:

  1. open PowerShell 7 as Administrator
  2. go to c:\git\tmp-theia\helloWorldIssue
  3. call yo theia-extension
  4. select "Hello World" with
  5. take default project name "hello-world"

First issue, few errors:

PS C:\git\tmp-theia\helloWorldIssue> yo theia-extension
? The extension's type Hello World
? The extension's name hello-world
HelloWorld
   create package.json
   create lerna.json
   create .gitignore
   create README.md
   create .vscode\launch.json
   create hello-world\package.json
   create hello-world\tsconfig.json
   create hello-world\src\browser\hello-world-frontend-module.ts
   create hello-world\src\browser\hello-world-contribution.ts
   create hello-world\README.md
   create browser-app\package.json
   create electron-app\package.json
Installing dependencies
node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: spawn yarn ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: []
}

Node.js v20.18.0
  1. enter yarn install
    Result:
$ lerna run prepare
lerna info version 2.4.0
hello-world: > hello-world@0.0.0 prepare
hello-world: > yarn run clean && yarn run build
hello-world: yarn run v1.22.22
hello-world: warning package.json: No license field
hello-world: $ rimraf lib
hello-world: Done in 0.35s.
hello-world: yarn run v1.22.22
hello-world: warning package.json: No license field
hello-world: $ tsc
hello-world: Done in 2.56s.
lerna success run Ran npm script 'prepare' in packages:
lerna success - hello-world
Done in 129.55s.
  1. call yarn build:browser
    Result:
PS C:\git\tmp-theia\helloWorldIssue> yarn build:browser
yarn run v1.22.22
$ yarn --cwd browser-app bundle
$ yarn rebuild && theia build --mode development
$ theia rebuild:browser --cacheRoot ..
native node modules are already rebuilt for browser
assets by status 1.91 MiB [cached] 14 assets
assets by path *.js 23 MiB
  assets by chunk 1.79 MiB (id hint: vendors)
    asset vendors-node_modules_theia_terminal_lib_browser_terminal-frontend-module_js.js 540 KiB [emitted] (id hint: vendors) 2 related assets
    asset vendors-node_modules_theia_preferences_lib_browser_preference-frontend-module_js.js 390 KiB [emitted] (id hint: vendors) 2 related assets
    asset vendors-node_modules_theia_navigator_lib_browser_navigator-frontend-module_js.js 215 KiB [emitted] (id hint: vendors) 2 related assets
    asset vendors-node_modules_theia_workspace_lib_browser_workspace-frontend-module_js.js 153 KiB [emitted] (id hint: vendors) 2 related assets
    + 13 assets
  + 10 assets
asset secondary-window.html 531 bytes [emitted] [from: src-gen/frontend/secondary-window.html] [copied] 1 related asset
2130 modules


WARNING in ../node_modules/inversify/es/inversify.js 2:0-60
export 'LazyServiceIdentifier' (reexported as 'LazyServiceIdentifier') was not found in '@inversifyjs/common' (module has no exports)
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 18:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 19:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 22:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 156:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 157:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 160:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 5:11-21
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 10:22-32
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/common/lib/esm/index.js 1:0-80
Module not found: Error: Can't resolve './services/models/LazyServiceIdentifier' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\common\lib\esm'
Did you mean 'LazyServiceIdentifier.js'?
BREAKING CHANGE: The request './services/models/LazyServiceIdentifier' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/inversify.js 2:0-60 2:0-60
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 1:0-68
Module not found: Error: Can't resolve './legacyTarget/calculations/getTargets' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getTargets.js'?
BREAKING CHANGE: The request './legacyTarget/calculations/getTargets' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 2:0-74
Module not found: Error: Can't resolve './legacyTarget/models/LegacyTargetImpl' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'LegacyTargetImpl.js'?
BREAKING CHANGE: The request './legacyTarget/models/LegacyTargetImpl' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 3:0-126
Module not found: Error: Can't resolve './metadata/calculations/getClassElementMetadataFromLegacyMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassElementMetadataFromLegacyMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassElementMetadataFromLegacyMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 4:0-76
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 5:0-112
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadataFromMetadataReader' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadataFromMetadataReader.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadataFromMetadataReader' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 6:0-86
Module not found: Error: Can't resolve './metadata/models/ClassElementMetadataKind' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'ClassElementMetadataKind.js'?
BREAKING CHANGE: The request './metadata/models/ClassElementMetadataKind' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/index.js 5:22-42

7 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.96.1 compiled with 7 errors and 9 warnings in 22091 ms

assets by status 237 KiB [cached] 2 assets
assets by info 1.68 MiB [immutable]
  assets by path *.woff2 256 KiB
    asset 2f64b833219dc8433424.woff2 88.6 KiB [emitted] [immutable] [from: ../node_modules/file-icons-js/fonts/file-icons.woff2] (auxiliary name: secondary-window)
    + 4 assets
  assets by path *.ttf 312 KiB
    asset 1e59d2330b4c6deb84b3.ttf?v=4.7.0 162 KiB [emitted] [immutable] [from: ../node_modules/font-awesome/fonts/fontawesome-webfont.ttf?v=4.7.0] (auxiliary name: secondary-window)
    + 2 assets
  asset cd3c4b260f85aac6f600.wasm 460 KiB [emitted] [immutable] [from: ../node_modules/vscode-oniguruma/release/onig.wasm] (auxiliary name: secondary-window)
  asset c1e38fd9e0e74ba58f7a.svg?v=4.7.0 434 KiB [emitted] [immutable] [from: ../node_modules/font-awesome/fonts/fontawesome-webfont.svg?v=4.7.0] (auxiliary name: secondary-window)
  asset 8b43027f47b20503057d.eot?v=4.7.0 162 KiB [emitted] [immutable] [from: ../node_modules/font-awesome/fonts/fontawesome-webfont.eot?v=4.7.0] (auxiliary name: secondary-window)
  asset f691f37e57f04c152e23.woff?v=4.7.0 95.7 KiB [emitted] [immutable] [from: ../node_modules/font-awesome/fonts/fontawesome-webfont.woff?v=4.7.0] (auxiliary name: secondary-window)
assets by chunk 20.1 MiB (name: secondary-window)
  asset secondary-window.js 19.6 MiB [emitted] (name: secondary-window) 1 related asset
  asset secondary-window.css 470 KiB [emitted] (name: secondary-window) 1 related asset
Entrypoint secondary-window 20.1 MiB (21.8 MiB) = secondary-window.css 470 KiB secondary-window.js 19.6 MiB 16 auxiliary assets
runtime modules 96.4 KiB 428 modules
orphan modules 1.06 MiB (javascript) 1.46 MiB (asset) [orphan] 162 modules
javascript modules 16.3 MiB 1710 modules
css modules 415 KiB 136 modules
json modules 1.65 MiB
  modules by path ../node_modules/@theia/core/ 1.5 MiB 50 modules
  modules by path ../node_modules/@theia/monaco/ 34.5 KiB 10 modules
  modules by path ../node_modules/iconv-lite/ 86.7 KiB 8 modules
  modules by path ../node_modules/ajv/lib/ 3.12 KiB 2 modules
  ../node_modules/entities/lib/maps/entities.json 28.4 KiB [built] [code generated]
../node_modules/vscode-oniguruma/release/onig.wasm 460 KiB (asset) 42 bytes (javascript) [built] [code generated]


WARNING in ../node_modules/inversify/es/inversify.js 2:0-60
export 'LazyServiceIdentifier' (reexported as 'LazyServiceIdentifier') was not found in '@inversifyjs/common' (module has no exports)
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 18:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 19:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 22:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 156:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 157:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/planner.js 160:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 5:11-21
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 10:22-32
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/common/lib/esm/index.js 1:0-80
Module not found: Error: Can't resolve './services/models/LazyServiceIdentifier' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\common\lib\esm'
Did you mean 'LazyServiceIdentifier.js'?
BREAKING CHANGE: The request './services/models/LazyServiceIdentifier' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/inversify.js 2:0-60 2:0-60
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 1:0-68
Module not found: Error: Can't resolve './legacyTarget/calculations/getTargets' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getTargets.js'?
BREAKING CHANGE: The request './legacyTarget/calculations/getTargets' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 2:0-74
Module not found: Error: Can't resolve './legacyTarget/models/LegacyTargetImpl' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'LegacyTargetImpl.js'?
BREAKING CHANGE: The request './legacyTarget/models/LegacyTargetImpl' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 3:0-126
Module not found: Error: Can't resolve './metadata/calculations/getClassElementMetadataFromLegacyMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassElementMetadataFromLegacyMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassElementMetadataFromLegacyMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 4:0-76
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 5:0-112
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadataFromMetadataReader' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadataFromMetadataReader.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadataFromMetadataReader' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 6:0-86
Module not found: Error: Can't resolve './metadata/models/ClassElementMetadataKind' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'ClassElementMetadataKind.js'?
BREAKING CHANGE: The request './metadata/models/ClassElementMetadataKind' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/frontend/secondary-index.js 3:22-42

7 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.96.1 compiled with 7 errors and 9 warnings in 12175 ms

assets by path *.js 7.87 MiB
  assets by chunk 7.81 MiB (id hint: vendors)
    asset vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0f6628.js 5.17 MiB [emitted] (id hint: vendors) 1 related asset
    asset vendors-node_modules_theia_core_lib_common_index_js.js 2.15 MiB [emitted] (id hint: vendors) 1 related asset
    + 2 assets
  asset main.js 34.9 KiB [emitted] (name: main) 1 related asset
  asset parcel-watcher.js 16.5 KiB [emitted] (name: parcel-watcher) 1 related asset
  asset ipc-bootstrap.js 15.4 KiB [emitted] (name: ipc-bootstrap) 1 related asset
assets by path native/*.node 1.38 MiB
  asset native/watcher.node 503 KiB [emitted] (auxiliary id hint: vendors)
  asset native/conpty.node 283 KiB [emitted] (auxiliary id hint: vendors)
  asset native/pty.node 253 KiB [emitted] (auxiliary id hint: vendors)
  asset native/drivelist.node 215 KiB [emitted] (auxiliary id hint: vendors)
  asset native/keytar.node 161 KiB [emitted] (auxiliary id hint: vendors)
asset worker/conoutSocketWorker.js 3.31 KiB [emitted] (name: worker/conoutSocketWorker) 1 related asset
Entrypoint main 7.84 MiB (8.16 MiB) = vendors-node_modules_theia_core_lib_common_index_js.js 2.15 MiB vendors-node_modules_theia_filesystem_lib_node_parcel-watcher_parcel-filesystem-service_js-no-eaffc7.js 422 KiB vendors-node_modules_theia_core_lib_node_messaging_ipc-channel_js-node_modules_theia_core_lib-cf60f3.js 71.8 KiB vendors-node_modules_drivelist_build_Release_drivelist_node-node_modules_stroncium_procfs_lib-0f6628.js 5.17 MiB main.js 34.9 KiB 10 auxiliary assets
Entrypoint ipc-bootstrap 2.24 MiB (1.36 MiB) = vendors-node_modules_theia_core_lib_common_index_js.js 2.15 MiB vendors-node_modules_theia_core_lib_node_messaging_ipc-channel_js-node_modules_theia_core_lib-cf60f3.js 71.8 KiB ipc-bootstrap.js 15.4 KiB 3 auxiliary assets
Entrypoint worker/conoutSocketWorker 3.31 KiB (2.8 KiB) = worker/conoutSocketWorker.js 1 auxiliary asset
Entrypoint parcel-watcher 2.58 MiB (2.25 MiB) = vendors-node_modules_theia_core_lib_common_index_js.js 2.15 MiB vendors-node_modules_theia_filesystem_lib_node_parcel-watcher_parcel-filesystem-service_js-no-eaffc7.js 422 KiB parcel-watcher.js 16.5 KiB 4 auxiliary assets
runtime modules 11.3 KiB 31 modules
javascript modules 4.9 MiB
  cacheable modules 4.89 MiB
    modules by path ../node_modules/ 4.89 MiB 1054 modules
    modules by path ./ 5.22 KiB
      modules by path ./src-gen/backend/*.js 4.88 KiB 2 modules
      modules by path ./lib/backend/native-webpack-plugin/*.js 341 bytes 2 modules
  + 44 modules
json modules 1.92 MiB
  modules by path ../node_modules/@theia/core/ 1.5 MiB 16 modules
  modules by path ../node_modules/body-parser/ 86.7 KiB 8 modules
  modules by path ../node_modules/iconv-lite/ 86.7 KiB 8 modules
  modules by path ../node_modules/raw-body/ 86.7 KiB 8 modules
  + 5 modules

WARNING in ../node_modules/inversify/es/inversify.js 2:0-60
export 'LazyServiceIdentifier' (reexported as 'LazyServiceIdentifier') was not found in '@inversifyjs/common' (module has no exports)
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 18:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 19:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 22:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 156:31-72
export 'getClassElementMetadataFromLegacyMetadata' (imported as 'getClassElementMetadataFromLegacyMetadata') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 157:38-72
export 'ClassElementMetadataKind' (imported as 'ClassElementMetadataKind') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/planner.js 160:21-31
export 'LegacyTargetImpl' (imported as 'TargetImpl') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 5:11-21
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

WARNING in ../node_modules/inversify/es/planning/reflection_utils.js 10:22-32
export 'getTargets' (imported as 'getTargets') was not found in '@inversifyjs/core' (module has no exports)
 @ ../node_modules/inversify/es/planning/planner.js 11:0-100 114:31-46 116:47-74 118:69-84
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/common/lib/esm/index.js 1:0-80
Module not found: Error: Can't resolve './services/models/LazyServiceIdentifier' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\common\lib\esm'
Did you mean 'LazyServiceIdentifier.js'?
BREAKING CHANGE: The request './services/models/LazyServiceIdentifier' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/inversify.js 2:0-60 2:0-60
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 1:0-68
Module not found: Error: Can't resolve './legacyTarget/calculations/getTargets' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getTargets.js'?
BREAKING CHANGE: The request './legacyTarget/calculations/getTargets' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 2:0-74
Module not found: Error: Can't resolve './legacyTarget/models/LegacyTargetImpl' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'LegacyTargetImpl.js'?
BREAKING CHANGE: The request './legacyTarget/models/LegacyTargetImpl' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 3:0-126
Module not found: Error: Can't resolve './metadata/calculations/getClassElementMetadataFromLegacyMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassElementMetadataFromLegacyMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassElementMetadataFromLegacyMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 4:0-76
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadata' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadata.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadata' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 5:0-112
Module not found: Error: Can't resolve './metadata/calculations/getClassMetadataFromMetadataReader' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'getClassMetadataFromMetadataReader.js'?
BREAKING CHANGE: The request './metadata/calculations/getClassMetadataFromMetadataReader' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

ERROR in ../node_modules/@inversifyjs/core/lib/esm/index.js 6:0-86
Module not found: Error: Can't resolve './metadata/models/ClassElementMetadataKind' in 'C:\git\tmp-theia\helloWorldIssue\node_modules\@inversifyjs\core\lib\esm'
Did you mean 'ClassElementMetadataKind.js'?
BREAKING CHANGE: The request './metadata/models/ClassElementMetadataKind' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
 @ ../node_modules/inversify/es/planning/planner.js 1:0-137 18:31-72 19:38-72 22:21-31 156:31-72 157:38-72 160:21-31
 @ ../node_modules/inversify/es/container/container.js 62:0-85 122:19-39 124:32-52 317:28-45 637:26-30
 @ ../node_modules/inversify/es/inversify.js 4:0-50 4:0-50
 @ ./src-gen/backend/server.js 12:22-42
 @ ./src-gen/backend/main.js 82:21-40

7 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

webpack 5.96.1 compiled with 7 errors and 9 warnings in 14345 ms

Error: webpack exited with an unexpected code: 1.
    at ChildProcess.<anonymous> (C:\git\tmp-theia\helloWorldIssue\node_modules\@theia\application-manager\lib\application-process.js:72:28)
    at ChildProcess.emit (node:events:519:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS C:\git\tmp-theia\helloWorldIssue>

image

Additional Information

  • Operating System: Windows 11 Enterprise, 23H2, 22631.4391, Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz 2.71 GHz
  • Theia Version: 1.55.0
@msujew
Copy link
Member

msujew commented Nov 11, 2024

Hey @cbries,

unfortunately, inversify managed to break our build process with their latest update. A fix is already in review. See inversify/InversifyJS#1617.

@sdirix
Copy link
Member

sdirix commented Nov 11, 2024

To workaround the issue you can pin the inversify version to 6.0.3 by adding

  "resolutions": {
    "inversify": "6.0.3"
  }

in the generated root package.json.

@cbries
Copy link
Author

cbries commented Nov 11, 2024

@sdirix great, workaround looks ok for me
I can build and start the browser variant.
Thanks.

@descreekert
Copy link

@sdirix with the workaround, build is successful, but start browser encounter below issue:

root@c5c43034437e:~/my-theia-app# yarn start:browser
yarn run v1.22.22
$ yarn --cwd browser-app start
$ theia start
Error: The number of constructor arguments in the derived class NodeStopwatch must be >= than the number of constructor arguments of its base class.
    at /root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10770:27
    at Array.forEach (<anonymous>)
    at _createSubRequests (/root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10752:20)
    at /root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10774:17
    at Array.forEach (<anonymous>)
    at /root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10773:26
    at Array.forEach (<anonymous>)
    at _createSubRequests (/root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10752:20)
    at plan (/root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:10795:9)
    at /root/my-theia-app/browser-app/lib/backend/vendors-node_modules_theia_core_lib_common_index_js.js:9990:46

Specify --help for available options
Done in 0.82s.

@msujew
Copy link
Member

msujew commented Nov 13, 2024

@descreekert It looks like you're still pulling a newer version of Inversify. Can you run yarn why inversify?

@descreekert
Copy link

@msujew here is the output of yarn why inversify

root@c5c43034437e:~/my-theia-app# yarn why inversify
yarn why v1.22.22
[1/4] Why do we have the module "inversify"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "inversify@6.0.3"
info Reasons this module exists
   - "_project_#hello-world#@theia#core" depends on it
   - Hoisted from "_project_#hello-world#@theia#core#inversify"
info Disk size without dependencies: "2.25MB"
info Disk size with unique dependencies: "2.25MB"
info Disk size with transitive dependencies: "2.25MB"
info Number of shared dependencies: 0
Done in 2.10s.

@msujew
Copy link
Member

msujew commented Nov 13, 2024

@descreekert That's unexpected. I can confirm that this should definitely work with 6.0.3. Can you attempt to clean your apps output directory and rebuild everything?

@sdirix
Copy link
Member

sdirix commented Nov 13, 2024

@descreekert can you provide a reproducible example for this issue so that we can better investigate it? I built a Theia based application consuming all available Theia extensions in version 1.55.0 and it ran fine for me when inversify was pinned to 6.0.3.

@descreekert
Copy link

@msujew @sdirix thanks for your help, indeed the inversity@6.0.3 is working, I manually delete the inversity package installed by yo and reinstall it with 6.0.3 version, it's working now !
Here are the scripts I used.

npm install -g yo generator-theia-extension
mkdir my-theia-app
cd my-theia-app
yo theia-extension -y hello-world hello-world

rm -rf node_modules/inversify
yarn add -W inversify@6.0.3
yarn build:browser
yarn start:browser --hostname=0.0.0.0

@sdirix
Copy link
Member

sdirix commented Nov 14, 2024

Hi @descreekert, great that it works now for you 👍

Tip: yarn add -W inversify@6.0.3 will only hint to yarn that you would like inversify@6.0.3 to be used. Depending on the complexity of your mono repo, you then might end up with multiple versions of inversify, the one of the root and the one of your dependencies.

It's safer to go the resolutions route, i.e.

  "resolutions": {
    "inversify": "6.0.3"
  }

as that forces yarn to resolve all inversify dependencies to resolve to this single version.

@descreekert
Copy link

@sdirix great thanks ! will go for resolutions route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants