-
Notifications
You must be signed in to change notification settings - Fork 787
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") SyntaxError: missing ) after argument list #677
Comments
I added a comment on npm/cmd-shim#17 which I believe will solve the issue. For those who come here please refer to Usage on Windows section in the Istanbul readme. |
@copenhas thank you very much. I'll test tonight, confirm, and close this. |
@copenhas bingo! This works for mocha: ./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha Thank you for your outstanding support and very quick response. Best to you, Karl |
For those who uses Tape, the command should be : |
Just got the same error with |
"test": "node --inspect node_modules/.bin/cross-env API_HOST=url ember serve", In my case when i removed node --inspect than its its work for me. "test": "node_modules/.bin/cross-env API_HOST=url ember serve", This solution works for Windows machine |
I'd recommend using |
I'm attempting to build the [playground](https://github.com/foyerlive/playground) project on Windows but have run into an error. Running `npm run build` in the Playground project results in: ``` D:\dev-ie\auspost-kiosk\playground\node_modules\.bin\webpack:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list ``` The build fails after this error. It appears to be a common error on Windows. gotwarlost/istanbul#677 jestjs/jest#4751 There might be a few potential solutions. This blog post suggested changing how Webpack is called. https://www.programmersought.com/article/49215661254/ Quote: > The first type of packaging command is ./node_modules/.bin/webpack, > you can see that all the shell commands in the .bin directory are .cmd; > > The second type of packaging command is ./node_modules/webpack/bin/webpack, > the last webpack is actually a js file, of course it supports node, > which also reflects the flexibility and omnipotence of the js language.
I'm attempting to build the [playground](https://github.com/foyerlive/playground) project on Windows but have run into an error. Running `npm run build` in the Playground project results in: ``` D:\dev-ie\auspost-kiosk\playground\node_modules\.bin\webpack:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list ``` The build fails after this error. It appears to be a common error on Windows. gotwarlost/istanbul#677 jestjs/jest#4751 There might be a few potential solutions. This blog post suggested changing how Webpack is called. https://www.programmersought.com/article/49215661254/ Quote: > The first type of packaging command is ./node_modules/.bin/webpack, > you can see that all the shell commands in the .bin directory are .cmd; > > The second type of packaging command is ./node_modules/webpack/bin/webpack, > the last webpack is actually a js file, of course it supports node, > which also reflects the flexibility and omnipotence of the js language.
Hi all, I am using a windows laptop and I am trying to debug mocha test files in nodejs application using vscode but I am getting this error same error as above when I try to debug the individual spec file in vscode any idea how can it be fixed? Do I need to make any changes in launch.json or package.json file?
|
Just change path name: |
This fixes the following error that happens when start node-red in windows and bash basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") SyntaxError: missing ) after argument list gotwarlost/istanbul#677
I have a super simple Nodejs ES6 app. Not using Babel, not required.
On my Mac, the app runs, all tests run, and istanbul coverage works perfect.
On my Windows 10, the app runs, all tests run, but I get the below error when trying to use coverage.
Mac node -v v6.2.2
Windows node -v v6.3.1
Apologies, but I have no idea where to start. I've searched the web, one other person reported a similar problem on Windows here: npm/cmd-shim#17 but I can't be sure this is the exact same root cause, I don't have the deep expertise.
Thank you in advance for any help in getting this working on Windows.
This is my command line:
node ./node_modules/.bin/istanbul cover ./node_modules/.bin/mocha
Error message:
Thank you,
Karl
The text was updated successfully, but these errors were encountered: