intellij-emberjs icon indicating copy to clipboard operation
intellij-emberjs copied to clipboard

Running `ember serve` from Intellij IDE through `Run` (^R) throws errors - existing with code 127

Open rinoldsimon opened this issue 7 years ago • 5 comments

Description

/Users/workspace/web_ui/node_modules/.bin/ember serve env: node: No such file or directory

Process finished with exit code 127

Steps to Reproduce

  • at times, after newly opening IntelliJ IDE
  • when i restart the IDE it works fine

Expected behavior: Start ember server

Actual behavior: Throws error in Run tool window

Reproduces how often: Alternate number of times.

Versions

  • IntelliJ:

IntelliJ IDEA 2018.2.5 (Ultimate Edition) Build #IU-182.4892.20, built on October 16, 2018

  • The version of intellij-emberjs:

2018.2.4-0

rinoldsimon avatar Oct 22 '18 03:10 rinoldsimon

it sounds like IntelliJ can't find your Node.js executable

Turbo87 avatar Oct 22 '18 12:10 Turbo87

why does it happen at alternate number of time? However i specified node path under preference -> languages & frameworks -> node.js and npm

rinoldsimon avatar Oct 22 '18 13:10 rinoldsimon

why does it happen at alternate number of time?

I don't know...

However i specified node path under preference -> languages & frameworks -> node.js and npm

I think we might not use that path but instead look for a global node binary. @makepanic might know this?

Turbo87 avatar Oct 22 '18 14:10 Turbo87

Yes we execute the node_modules/.bin/ember executable directly. I guess on your system #!/usr/bin/env node returns nothing.

Maybe it's a good idea to also check if we can access the global node binary.

makepanic avatar Oct 22 '18 14:10 makepanic

I use nvm. So in my node interpreter my path will be ~/.nvm/versions/node/v8.9.4/bin/node.

As @Turbo87 mentioned that the addon doesn't use node interpreter path but instead it looks at node_modules/.bin/ember serve directly and this behaviour breaks sometimes and throws env: node: No such file or directory

rinoldsimon avatar Oct 22 '18 16:10 rinoldsimon