eclipse-theia / generator-theia-extension

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

Update README.md to note the need for yarn #179

Closed bleonard closed 1 month ago

bleonard commented 1 year ago

I found this was needed to prevent an error

mkdir my-extension && cd my-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
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: -2,
  code: 'ENOENT',
  syscall: 'spawn yarn',
  path: 'yarn',
  spawnargs: []
}

Node.js v18.18.0
JonasHelming commented 1 year ago

@bleonard Thank you for the report and the contribution! @vince-fugnitto Should we consider you execute "yarn" as the last step of the generator instead?

vince-fugnitto commented 1 year ago

@vince-fugnitto Should we consider you execute "yarn" as the last step of the generator instead?

@JonasHelming I'm not sure I follow, can you clarify? The latest version of the generator works well for me, it generates the project, and performs yarn to install dependencies. The users can then build which example they want and start it. Why do we want to run yarn last?

JonasHelming commented 1 year ago

Ah, I misread the issue. The contribution adds "yarn" after installing the generator, but not after running it...