eclipse-theia / generator-theia-extension

A Yeoman generator for extensions to the Theia IDE
Other
55 stars 40 forks source link

`spawn yarn` fails when doing `yo theia-extension` #212

Closed tsmaeder closed 1 month ago

tsmaeder commented 1 month ago
<some dir>\test-extension>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:495
      throw er; // Unhandled 'error' event
      ^

Error: spawn yarn ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477: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:290:12)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: []
}

Node.js v18.20.4
JonasHelming commented 1 month ago

Was this resolved when using Node 20? (see #217)

tsmaeder commented 1 month ago

Yes

JonasHelming commented 1 month ago

fixed with https://github.com/eclipse-theia/generator-theia-extension/issues/217

nulidexiaoyang commented 1 month ago

Was this resolved when using Node 20? (see #217)

thanks, I have resolved it by this way

JonasHelming commented 1 month ago

The new release should now work with Node 18 again! Closing this.