generator-theia-extension icon indicating copy to clipboard operation
generator-theia-extension copied to clipboard

Update README.md to note the need for yarn

Open bleonard opened this issue 2 years ago • 3 comments
trafficstars

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

bleonard avatar Oct 01 '23 18:10 bleonard

@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?

JonasHelming avatar Oct 02 '23 14:10 JonasHelming

@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?

vince-fugnitto avatar Oct 02 '23 14:10 vince-fugnitto

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

JonasHelming avatar Oct 02 '23 14:10 JonasHelming