concurrently icon indicating copy to clipboard operation
concurrently copied to clipboard

Concurrently 3.0.0 on Windows

Open seangwright opened this issue 10 years ago • 12 comments

I just updated to v 3.0.0 and now am receiving errors when using concurrently

Here is my output

$ npm start

> [email protected] start C:\dev\projects\proj
> concurrently --kill-others "npm run tsc:w" "npm run lite" "npm run styles:w"

[0] /c: /c: is a directory
[1] /c: /c: is a directory
[2] /c: /c: is a directory
[0] npm run tsc:w exited with code 126
[1] npm run lite exited with code 126   
[2] npm run styles:w exited with code 126

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.4.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `concurrently --kill-others "npm run tsc:w" "npm run lite" "npm run styles:w"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'concurrently --kill-others "npm run tsc:w" "npm run lite" "npm run styles:w"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the proj package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     concurrently --kill-others "npm run tsc:w" "npm run lite" "npm run styles:w"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs proj
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls proj
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\dev\projects\proj\npm-debug.log

And here is my scripts block in package.json

"scripts": {
    "start": "tsc && concurrently --kill-others \"npm run tsc:w\" \"npm run lite\" \"npm run styles:w\"",
    "lite": "lite-server",
    "postinstall": "jspm install && typings install",
    "jspm": "jspm",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings",
    "bundle:prod": "jspm bundle app --minify --inject",
    "bundle": "jspm bundle app --inject",
    "styles": "node-sass --output-style nested -o ./ scss/styles.scss --include-path node_modules",
    "styles:w": "npm run styles && node-sass scss -wo ./ --include-path node_modules"
  }

I think the problem I'm experiencing is related to this issue https://github.com/kimmobrunfeldt/chokidar-cli/issues/15

seangwright avatar Sep 26 '16 14:09 seangwright

Which terminal are you using? What are your SHELL and COMSPEC environment variables? This module is now used for the shell spawning: https://github.com/kimmobrunfeldt/spawn-default-shell

kimmobrunfeldt avatar Sep 26 '16 15:09 kimmobrunfeldt

I'm using MINGW64 (https://git-for-windows.github.io) wrapped by ConEmu (https://conemu.github.io). Most recent versions for both.

$ echo $SHELL
/usr/bin/bash

$ echo $COMSPEC
C:\WINDOWS\system32\cmd.exe

seangwright avatar Sep 26 '16 16:09 seangwright

Ah ok so it seems that /usr/bin/bash /c command is being run. For now you can fix it by either reverting back to [email protected] version or setting SHELL_EXECUTE_FLAG =-c environment variable manually. On windows platform the default flag is /c even though.

It should be changed to decide the execution flag based on shell, not platform.

kimmobrunfeldt avatar Sep 26 '16 16:09 kimmobrunfeldt

I created this issue here: https://github.com/kimmobrunfeldt/spawn-default-shell/issues/1 and will fix it pretty soon.

kimmobrunfeldt avatar Sep 26 '16 16:09 kimmobrunfeldt

This should be now fixed in 3.1.0: https://github.com/kimmobrunfeldt/concurrently/releases/tag/3.1.0

kimmobrunfeldt avatar Oct 02 '16 10:10 kimmobrunfeldt

@kimmobrunfeldt confirmed. thanks

simoneb avatar Oct 02 '16 11:10 simoneb

Still broken on Windows with 3.1.0, using Git Bash shell. The commands work on their own but not with concurrently. Moving back to [email protected] does resolve the issue.

Node: 6.9.1 npm: 3.10.8 concurrenlt: 3.1.0 Windows 7 npm-debug.log.txt

Chowarmaan avatar Jan 18 '17 22:01 Chowarmaan

@Chowarmaan seems to be fixed in their latest version 3.4.0

a-metta avatar Mar 20 '17 19:03 a-metta

Doesn't work for me in Windows with 3.4.0 version. Manual or in npm scripts.

==

concurrently 'webpack-dev-server --config conf/webpack.config' 'gulp watch'

[0] 'webpack-dev-serve' is not recognized as an internal or external command, [0] operable program or batch file. [1] 'gul' is not recognized as an internal or external command, [1] operable program or batch file. [2] 'watch'' is not recognized as an internal or external command, [2] operable program or batch file. [2] watch' exited with code 1 [1] gul exited with code 1 [0] webpack-dev-serve exited with code 1

dragosrusu avatar Apr 29 '17 21:04 dragosrusu

Updating to 3.5.0 fixed it for me.

steadycoding avatar Sep 17 '17 06:09 steadycoding

For some reason concurrently uses my home directory rather than the project directory. I am using the version 4.1.1. As the image shows, running 'pwd' shows the current directory to be the home directory instead of the project directory. This causes an issue when I am creating scripts to run my react dev server and express api in one command.

OS: Windows 10 Node version: v11.5.0 Npm version: 6.9.0 Concurrently: 4.1.1

image

pranjaljately avatar Jul 24 '19 11:07 pranjaljately

For some reason concurrently uses my home directory rather than the project directory. I am using the version 4.1.1. As the image shows, running 'pwd' shows the current directory to be the home directory instead of the project directory. This causes an issue when I am creating scripts to run my react dev server and express api in one command.

OS: Windows 10 Node version: v11.5.0 Npm version: 6.9.0 Concurrently: 4.1.1

image

I'm also experiencing this issue on Win10. I tried with versions: 2.2.0, 3.6.1, 5.1.0 and no luck. What worked for me was switching to npm-run-all

mukunku avatar Apr 09 '20 14:04 mukunku