Problem running parallelshell Nodejs script

后端 未结 3 767
离开以前
离开以前 2021-01-06 14:49

In my package.json file I have the following scripts:

\"scripts\": {
    \"start\": \"npm run watch:all\",
    \"test\": \"echo \\\"Error: no test specified\         


        
相关标签:
3条回答
  • 2021-01-06 15:11

    There is a problem with Parallelshell that has to be fixed manually;

    go to the file:

    node_modules/parallelshell/index.js:105
    

    Then change this line:

    cwd: process.versions.node < '8.0.0' ? process.cwd : process.cwd(),
    

    To this:

    cwd: parseInt(process.versions.node) < 8 ? process.cwd : process.cwd(),
    

    It's done!

    0 讨论(0)
  • 2021-01-06 15:11

    It works for me as I have facing similar issues parallelshell 3.2.2 doesnot cope with my node so I have to downgrade it

    0 讨论(0)
  • 2021-01-06 15:14

    cwd:

    parseInt(process.versions.node) < 8 ? process.cwd : process.cwd() 
    

    If you still face problems after doing this, you have to downgrade the version of paralleshell using this line:

    sudo npm install --save-dev parallelshell@3.0.1
    

    It worked for me.

    0 讨论(0)
提交回复
热议问题