Problem running parallelshell Nodejs script

Multi tool use
Multi tool use












0















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



"scripts": {
"start": "npm run watch:all",
"test": "echo "Error: no test specified" && exit 1",
"lite": "lite-server",
"sass": "node-sass -o sass/ css/",
"watch:sass": "onchange 'sass/*.scss' -- npm run sass",
"watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'"
}


Whenever I run my code I got this error message:



 crs@1.0.0 start /home/hazem/crs
> npm run watch:all


> crs@1.0.0 watch:all /home/hazem/crs
> parallelshell 'npm run watch:sass' 'npm run lite'

child_process.js:422
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
at normalizeSpawnArguments (child_process.js:422:11)
at spawn (child_process.js:537:38)
at /home/hazem/crs/node_modules/parallelshell/index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/hazem/crs/node_modules/parallelshell/index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 watch:all: `parallelshell 'npm run watch:sass' 'npm run lite'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_809Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_823Z-debug.log


So, in this case, what could be the problem? is it something wrong with the script? Or a bug in Parallelshell script in nodejs?










share|improve this question























  • See open issue #67 in the projects github repo.

    – RobC
    Nov 25 '18 at 11:49











  • @RobC Appreciate it, fixed!

    – White159
    Nov 25 '18 at 12:00
















0















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



"scripts": {
"start": "npm run watch:all",
"test": "echo "Error: no test specified" && exit 1",
"lite": "lite-server",
"sass": "node-sass -o sass/ css/",
"watch:sass": "onchange 'sass/*.scss' -- npm run sass",
"watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'"
}


Whenever I run my code I got this error message:



 crs@1.0.0 start /home/hazem/crs
> npm run watch:all


> crs@1.0.0 watch:all /home/hazem/crs
> parallelshell 'npm run watch:sass' 'npm run lite'

child_process.js:422
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
at normalizeSpawnArguments (child_process.js:422:11)
at spawn (child_process.js:537:38)
at /home/hazem/crs/node_modules/parallelshell/index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/hazem/crs/node_modules/parallelshell/index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 watch:all: `parallelshell 'npm run watch:sass' 'npm run lite'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_809Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_823Z-debug.log


So, in this case, what could be the problem? is it something wrong with the script? Or a bug in Parallelshell script in nodejs?










share|improve this question























  • See open issue #67 in the projects github repo.

    – RobC
    Nov 25 '18 at 11:49











  • @RobC Appreciate it, fixed!

    – White159
    Nov 25 '18 at 12:00














0












0








0








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



"scripts": {
"start": "npm run watch:all",
"test": "echo "Error: no test specified" && exit 1",
"lite": "lite-server",
"sass": "node-sass -o sass/ css/",
"watch:sass": "onchange 'sass/*.scss' -- npm run sass",
"watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'"
}


Whenever I run my code I got this error message:



 crs@1.0.0 start /home/hazem/crs
> npm run watch:all


> crs@1.0.0 watch:all /home/hazem/crs
> parallelshell 'npm run watch:sass' 'npm run lite'

child_process.js:422
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
at normalizeSpawnArguments (child_process.js:422:11)
at spawn (child_process.js:537:38)
at /home/hazem/crs/node_modules/parallelshell/index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/hazem/crs/node_modules/parallelshell/index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 watch:all: `parallelshell 'npm run watch:sass' 'npm run lite'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_809Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_823Z-debug.log


So, in this case, what could be the problem? is it something wrong with the script? Or a bug in Parallelshell script in nodejs?










share|improve this question














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



"scripts": {
"start": "npm run watch:all",
"test": "echo "Error: no test specified" && exit 1",
"lite": "lite-server",
"sass": "node-sass -o sass/ css/",
"watch:sass": "onchange 'sass/*.scss' -- npm run sass",
"watch:all": "parallelshell 'npm run watch:sass' 'npm run lite'"
}


Whenever I run my code I got this error message:



 crs@1.0.0 start /home/hazem/crs
> npm run watch:all


> crs@1.0.0 watch:all /home/hazem/crs
> parallelshell 'npm run watch:sass' 'npm run lite'

child_process.js:422
throw new ERR_INVALID_ARG_TYPE('options.cwd', 'string', options.cwd);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options.cwd" property must be of type string. Received type function
at normalizeSpawnArguments (child_process.js:422:11)
at spawn (child_process.js:537:38)
at /home/hazem/crs/node_modules/parallelshell/index.js:104:17
at Array.forEach (<anonymous>)
at Object.<anonymous> (/home/hazem/crs/node_modules/parallelshell/index.js:100:6)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 watch:all: `parallelshell 'npm run watch:sass' 'npm run lite'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 watch:all script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_809Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! crs@1.0.0 start: `npm run watch:all`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crs@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/hazem/.npm/_logs/2018-11-24T19_19_24_823Z-debug.log


So, in this case, what could be the problem? is it something wrong with the script? Or a bug in Parallelshell script in nodejs?







node.js json sass npm-scripts lite-server






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 24 '18 at 19:24









White159White159

629




629













  • See open issue #67 in the projects github repo.

    – RobC
    Nov 25 '18 at 11:49











  • @RobC Appreciate it, fixed!

    – White159
    Nov 25 '18 at 12:00



















  • See open issue #67 in the projects github repo.

    – RobC
    Nov 25 '18 at 11:49











  • @RobC Appreciate it, fixed!

    – White159
    Nov 25 '18 at 12:00

















See open issue #67 in the projects github repo.

– RobC
Nov 25 '18 at 11:49





See open issue #67 in the projects github repo.

– RobC
Nov 25 '18 at 11:49













@RobC Appreciate it, fixed!

– White159
Nov 25 '18 at 12:00





@RobC Appreciate it, fixed!

– White159
Nov 25 '18 at 12:00












1 Answer
1






active

oldest

votes


















3














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



go to the file:



node_modules/parallelshell/index.js


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!






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53461626%2fproblem-running-parallelshell-nodejs-script%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














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



    go to the file:



    node_modules/parallelshell/index.js


    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!






    share|improve this answer




























      3














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



      go to the file:



      node_modules/parallelshell/index.js


      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!






      share|improve this answer


























        3












        3








        3







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



        go to the file:



        node_modules/parallelshell/index.js


        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!






        share|improve this answer













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



        go to the file:



        node_modules/parallelshell/index.js


        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!







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 25 '18 at 12:04









        White159White159

        629




        629
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53461626%2fproblem-running-parallelshell-nodejs-script%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            sBOORQiiax9YySFHl1I0YT2jM UOI 6WuJ6B5AXFWcJRrL6RuZiI,1Noo ZPuon8 LVw,cmGs
            5ThO99Yo13bFSXS4U 9FvvWYr,kNs8Si ITZ,tIg6oU E2jwwwl

            Popular posts from this blog

            Costa Masnaga

            Fotorealismo

            Sidney Franklin