Skip to content

child_process throwing error ('"cwd" must be a string') #57

Closed
@MeanTeam

Description

@MeanTeam

throw new TypeError('"cwd" must be a string');
TypeError: "cwd" must be a string
at normalizeSpawnArguments (child_process.js:380:11)
at exports.spawn (child_process.js:465:38)

The problem comes from cwd: process.cwd,
I am thinking this could be solved executing the function to get the current path directory string: cwd: process.cwd(),

Using node 8.0.0 and npm 5.0.1

Activity

evolutionxbox

evolutionxbox commented on Jun 2, 2017

@evolutionxbox

Also using node 8.0.0 and npm 5.0.0

I've tried reinstalling parallelshell, but am met with another error

node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz
node-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.1/fse-v1.1.1-node-v57-darwin-x64.tar.gz

Are they related?

PierBover

PierBover commented on Jun 3, 2017

@PierBover

Same here... using Node 8 and NPM 5.0.1

darkguy2008

darkguy2008 commented on Jun 6, 2017

@darkguy2008
Owner

I've fixed it and made my own fork here: https://github.com/darkguy2008/parallelshell, I've also updated all the package.json libraries and made it work with latest mocha.

Unfortunately I have no idea how to push this to npm... and npm-run-all doesn't cut it, I like paralleshell as it doesn't need me to install something globally, and it works pretty well... it just needed some small fixes for Node 8.0. I'd rather use and maintain something that just works...

PierBover

PierBover commented on Jun 6, 2017

@PierBover

I moved to npm-run-all and it didn't require me to install anything globally.

darkguy2008

darkguy2008 commented on Jun 6, 2017

@darkguy2008
Owner

Yeah but the syntax and all looks different, and the documentation doesn't help me to understand how to use it (or how to migrate from parallelshell), so I'd rather use my own fixed version :/

PierBover

PierBover commented on Jun 6, 2017

@PierBover

To run scripts in parallel:
run-p some-npm-script some-other-npm-script

darkguy2008

darkguy2008 commented on Jun 6, 2017

@darkguy2008
Owner

Well, that worked! the documentation for npm-run-all was really confusing, your example was very clear and concise. Thanks!. Ah well, I still fixed the error in parallelshell haha, in case anyone is interested I'll keep the github repo :)

keithamus

keithamus commented on Jun 6, 2017

@keithamus
Collaborator

@darkguy2008 if you'd like I'd be happy to give you the commit bit for this repo, which would allow you to publish the fix for the canonical parallelshell npm package.

darkguy2008

darkguy2008 commented on Jun 6, 2017

@darkguy2008
Owner

@keithamus Hello Keith, oh really? :O that would be awesome! I could also submit a PR if you wish. In any case, I'd be really happy to help :) let me know what do you prefer so I can prepare the files with the fix 👍

keithamus

keithamus commented on Jun 6, 2017

@keithamus
Collaborator

@darkguy2008 you've been invited 😄. Feel free to manage the repo how you want! I'll give you publish rights on npm also if you give me your npm username.

darkguy2008

darkguy2008 commented on Jun 6, 2017

@darkguy2008
Owner

Awesome! Thanks a lot :) I'll take good care of it :D Sure, my npm username is the same one as here, darkguy2008. I needed to use it on a project so I made a package (parallelshell-v8) using my branch, I'll delete it now that I have access here and apply the fixes in your repo. Thanks again! 👍 I'll do it when I'm back home, as I'm at work atm.

maoberlehner

maoberlehner commented on Jun 12, 2017

@maoberlehner

@darkguy2008 working long hours, huh? ;)

Would be cool if this gets fixed in the not so distant future. Let me know if I can help.

darkguy2008

darkguy2008 commented on Jun 12, 2017

@darkguy2008
Owner

@maoberlehner Hello! Kind of haha, I had some very busy days lately, however, don't worry, I'm kinda free today so I'll do it in the upcoming hours - stay tuned :D !

36 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @keithamus@PierBover@pm0u@evolutionxbox@jimmynotjim

        Issue actions

          child_process throwing error ('"cwd" must be a string') · Issue #57 · darkguy2008/parallelshell