Closed derickkemp closed 6 years ago
Hi @derickkemp, thanks for letting us know. I'll check such behaviour in a Windows machine as soon as possible and post any updates here.
@derickkemp can you try using escaped double quotes? I've had some trouble with that in the past as well, single quotes aren't truly supported cross platform in npm scripts:
"server": "concurrently \"lite-server -c bs-config.json\" \"webpack\"",
Hi @filipesilva.
I'll give it a spin tonight.
@derickkemp - have you got any news? Unfortunately I haven't organised my time to test this in a VM :(
@gustavohenke sorry not yet.
I haven't touched my windows box in weeks. I'll set a reminder.
I was experiencing this issue on Windows today but haven't done any real investigation into it.
package.json
"scripts": {
"start": "concurrently \"npm run lint\" \"webpack --watch\" \"npm run serve\"",
"build": "npm run lint && webpack",
"serve": "nodemon --watch dist/index.js",
"test": "jest --forceExit",
"lint": "tslint -c tslint.json -p tsconfig.json",
"debug": "npm run build && node --debug-brk=3000 dist/index.js"
}
output
[2] [0] 'np' is not recognized as an internal or external command,
[2] [0] operable program or batch file.
[2] [1] 'run' is not recognized as an internal or external command,
[2] [1] operable program or batch file.
[2] [2] 'lint"' is not recognized as an internal or external command,
[2] [2] operable program or batch file.
[2] [3] 'webpac' is not recognized as an internal or external command,
[2] [3] operable program or batch file.
[2] [4] 'run' is not recognized as an internal or external command,
[2] [4] operable program or batch file.
[2] [5] 'serve"' is not recognized as an internal or external command,
[2] [5] operable program or batch file.
[2] [4] run exited with code 1
[2] [3] webpac exited with code 1
[2] [2] lint" exited with code 1
[2] [1] run exited with code 1
[2] [0] np exited with code 1
[2] [5] serve" exited with code 1
I did manage to get it working again by changing my package.json scripts around
"scripts": {
"serve": "concurrently \"npm run lint\" \"webpack --watch\" \"nodemon\"",
"build": "npm run lint && webpack",
"test": "jest --forceExit",
"lint": "tslint -c tslint.json -p tsconfig.json",
"debug": "npm run build && node --debug-brk=3000 dist/index.js"
},
And now starting my app with npm run serve instead of npm start.
Given no one commented on this issue for the past year, I'm closing it (yes, I'm also guilty of it).
If you still find these bugs while using concurrently, please open a new issue providing a self-enclosed example.
Thanks!
My project uses concurrently to run server-lite and webpack, my package.json looks as follows.
When I call
npm run server
on Fedora everything works as expected, when I try the same thing on Windows, I get the following error.I noticed it's removing the "r" from "lite-server", so I tried changing the script line to
and the it worked perfectly.
So it seems that concurrently is removing the last character from the command in windows.