eclipse-theia / generator-theia-extension

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

initial generation fails #27

Closed kuniss closed 5 years ago

kuniss commented 5 years ago

I'm currently working on a extension for Xtext syntax highlighting. :-) The VS code extension works already and now thought I may try to create a Theia extension too. Unfortunately, the generator did not work for me.

Not sure what and why it fails. May be I'm doing something wrong.

denis@modula:~/VSCodeWorkspace/xtext-theia-extension$ yo theia-extension xtext-lang
XtextLang
   create package.json
   create lerna.json
identical .gitignore
   create README.md
identical .vscode/launch.json
   create xtext-lang/package.json
   create xtext-lang/tsconfig.json
   create xtext-lang/src/browser/xtext-lang-frontend-module.ts
   create xtext-lang/src/browser/xtext-lang-contribution.ts
   create browser-app/package.json
   create electron-app/package.json
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn yarn ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Can you give me a hint, please?

svenefftinge commented 5 years ago

I think you need to install yarn: https://yarnpkg.com/en/docs/install

svenefftinge commented 5 years ago

Btw, for a language extension the easiest is to copy an existing a super simple language extension and just rename it. For instance the https://github.com/theia-ide/theia-ruby-extension only does the configuration and spawns a language server. :-)

kuniss commented 5 years ago

The yarn installation did the trick. Thanks, @svenefftinge. I will close it.

BTW, does Xtext already have a LS which could be used in cd browser-example && yarn start --hostname 0.0.0.0 path/to/xtext? Or, did I misunderstood your comment?

svenefftinge commented 5 years ago

It doesn't have one yet. So first step would be to go for syntax and configuration, only.