Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember Serve tries to run a .sh file on Windows #262

Open
RonyOCuinn opened this issue Jun 13, 2019 · 5 comments
Open

Ember Serve tries to run a .sh file on Windows #262

RonyOCuinn opened this issue Jun 13, 2019 · 5 comments

Comments

@RonyOCuinn
Copy link

Ember Serve tries to run a .sh file on Windows

Steps to Reproduce

Create a new Ember Serve run configuration.

Expected behavior: The same behaviour as running ember serve from the CLI.

Actual behavior: The following error occurs:

C:/DEV/nvm/v10.16.0/node C:/DEV/Projects/ember-quickstart/node_modules/.bin/ember serve
C:\DEV\Projects\ember-quickstart\node_modules\.bin\ember:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at Module._compile (internal/modules/cjs/loader.js:721:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Process finished with exit code 1

Reproduces how often: 100%

Versions

WebStorm 2019.1.3
Build #WS-191.7479.14, built on May 27, 2019

v2019.1.2-0

Additional Information

See: https://stackoverflow.com/questions/56542056/emberjs-webstorm-and-windows-cannot-run-through-ember-serve-configuration

@erveloso
Copy link

erveloso commented Aug 15, 2019

Same here! Latest PHPStorm and intellij-emberjs.

@pauln
Copy link

pauln commented Aug 28, 2019

I just had this mysteriously start happening to a previously-working ember serve run configuration, which left me scratching my head furiously for a while. I ended up comparing the .idea/workspace.xml from the affected project with that from another project (which was still working perfectly!) and have concluded that it's the node interpreter setting which causes this issue.

It seems that in earlier versions, the node interpreter setting either didn't exist or defaulted to an empty value - but now it can't be left blank within the UI, so if you edit an existing run config or create a new one, it'll be set to the default (which, at least in my case, is called "Project" but lists the path to my system-level installation of node.exe). Once a node interpreter is selected, the run config will try to use it to run the unix version of the ember command instead of running the Windows version (ember.cmd) directly (as it does when no node interpreter is configured).

As a workaround, you can get your broken run configuration(s) working (again) by closing Webstorm, editing the .idea/workspace.xml file and then starting Webstorm again. Once you've closed Webstorm:

  • open .idea/workspace.xml in a text editor of some kind
  • search for any <configuration> blocks with type="EMBER_SERVE_CONFIGURATION"
  • within each such <configuration> block, remove any <node-interpreter> tags (such as <node-interpreter value="project" />)
  • save and close the file
  • reopen Webstorm

@iqdoq-dfischer
Copy link

Same here. The workaround described by @pauln works, but has to be re-applied every time if I modify run/debug configurations.
My version is IntelliJ IDEA 2019.3 Ultimate Edition with Ember.js plugin 2019.3.1-0.
My OS is windows 10 v1809 on arch amd64.

@iqdoq-dfischer
Copy link

The workaround does not work anymore with v2019.3.3-0.

"C:/Program Files/nodejs/node" C:/Users/bla/sources/blub/web-ui/node_modules/.bin/ember serve
C:\Users\bla\sources\blub\web-ui\node_modules.bin\ember:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^

SyntaxError: missing ) after argument list
at new Script (vm.js:80:7)
at createScript (vm.js:274:10)
at Object.runInThisContext (vm.js:326:10)
at Module._compile (internal/modules/cjs/loader.js:664:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)

Process finished with exit code 1

@Close0
Copy link

Close0 commented Feb 2, 2020

@iqdoq-dfischer I'm having the same issue as you. What I ended up doing was opening the package.json file and clicked the "Play" icon for the "ember serve" line. Not really a fix but at least that's what I'm doing until something gets resolved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants