darkguy2008 / parallelshell

Run multiple shell commands in parallel
501 stars 44 forks source link

The "options.cwd" property must be of type string. Received type function #69

Closed FelixMH closed 5 years ago

FelixMH commented 5 years ago

I have node 11.0.0 and I have this issue when I use yarn start because a internal command by parallelshell isn't work. I've been use npm-run-all and I've been use the last version of parallelshell and the issue is continue.

the complete error is :

** child_process.js:417 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:417:11) at spawn (child_process.js:532:38) **

can anybody help me please ?

edrcq commented 5 years ago

@FelixMH I hope the PR can help you, dont hesitate to check the commits

-> https://github.com/darkguy2008/parallelshell/pull/70/commits/8d9df713c12cc3fdfc09a9291cdcf6b764bc9e8e

FelixMH commented 5 years ago

@FelixMH I hope the PR can help you, dont hesitate to check the commits

-> 8d9df71

Thank you for your comment, I need to solve this, but I am still in the same at the begin of this Open issue, I need help.

edrcq commented 5 years ago

Take the content of the file here : https://raw.githubusercontent.com/darkguy2008/parallelshell/master/index.js

And put the content in your /project/node_modules/parallelshell/index.js

It will works in waiting the next release of the module

FelixMH commented 5 years ago

You mean that I need to replace the content or just paste it in the file before mencionated?

edrcq commented 5 years ago

You take the content of this : (100% copy) https://raw.githubusercontent.com/darkguy2008/parallelshell/master/index.js

And put in your /project/node_modules/parallelshell/index.js (100% paste)

It will works

@FelixMH

FelixMH commented 5 years ago

Hi, thanks for the answer. now, in this moment I was try put the pasted code and that it works 100% I don't know if then will works fine but in this moment with node 10.0.0 works fine.

thanks a lot for the answer.

juanprog97 commented 5 years ago

thanks men, works 100%

armherr commented 5 years ago

@edrcq

Thank you very much :)

HalfMandu commented 5 years ago

@edrcq it worked, thanks

vinayakkuradia commented 5 years ago

Thanks a lot buddy!!! : )

rolisanchez commented 5 years ago

Thanks!!

mhers91 commented 5 years ago

Thank you! this worked perfectly.

RichardBradley commented 5 years ago

If anyone else stumbles on this and wants a workaround that doesn't involve locally modifying the node_modules dir, you can do:

npm i darkguy2008/parallelshell#8fd83e2 

until a new version is released which includes this fix.

(EDITED to fix typo in the npm command above; thanks @ManuelOviedo)

ManuelOviedo commented 5 years ago

npm -i darkguy2008/parallelshell#8fd83e2

its "npm i ..." (without the dash)

Melmoth-the-Wanderer commented 5 years ago

Is this going to be fixed/released anytime soon? It's been for almost a yea already and I came across the bug on very first approach to this package.

nathan815 commented 4 years ago

@FelixMH This issue should be reopened. It is not fixed.

@darkguy2008 Is this going to be released?

saurav1423 commented 4 years ago

@nathan815 don't try to translate in English, just copy whatever it is and paste it at the told location. It will work 100%.

Youvelop commented 4 years ago

Thank you man!

Nischalv1999 commented 4 years ago

its not working for me, its showing the same error! Can there be any other alternative?

omidantilong commented 4 years ago

Can confirm the error still exists.

The solution posted here still works: https://github.com/darkguy2008/parallelshell/issues/69#issuecomment-438318855

Please get this resolved!

tombannister-94 commented 4 years ago

I can confirm that this error still exists and the fix here still works.

Thanks @edrcq for the fix.

muhba25 commented 4 years ago

Fixed. Thanks @edrcq

CamaraMed commented 4 years ago

it works 100%. Thanks a lot

Arjungowda1 commented 3 years ago

Thanks buddy :)

kaanselhep commented 3 years ago

Yup, I can confirm https://github.com/darkguy2008/parallelshell/issues/69#issuecomment-438318855 this solution works as well... Its very strange but it seems nobody is actually fixing it

ssaran2014 commented 3 years ago

This problem still exists and the above solution still works. Thank you.

Melmoth-the-Wanderer commented 3 years ago

@FelixMH why is this issue closed? I don't think it's fixed in package, just ugly workaround.

TIKOsup commented 3 years ago

@edrcq It works! Thank you!

nathan815 commented 3 years ago

@saurav1423 A workaround isn't a fix. It should be implemented in the package itself and a new version released.

SgtPooki commented 3 years ago

@edrcq this is still broken. are you around?

SgtPooki commented 3 years ago

for those of you that want this fix to be "permanent".. check out patch-package

bajahranks commented 3 years ago

2021 Still not fixed.

Thankfully #69 works....

fadiof commented 2 years ago

Take the content of the file here : https://raw.githubusercontent.com/darkguy2008/parallelshell/master/index.js

And put the content in your /project/node_modules/parallelshell/index.js

It will works in waiting the next release of the module

thank you

thitlwin commented 2 years ago

You take the content of this : (100% copy) https://raw.githubusercontent.com/darkguy2008/parallelshell/master/index.js

And put in your /project/node_modules/parallelshell/index.js (100% paste)

It will works

@FelixMH

Thanks. It solves for me too.

Shreeharan1207 commented 2 years ago

You take the content of this : (100% copy) https://raw.githubusercontent.com/darkguy2008/parallelshell/master/index.js

And put in your /project/node_modules/parallelshell/index.js (100% paste)

It will works

@FelixMH

Thanks man!

flashape commented 2 years ago

How is this supposed to work in a ci/cd build environment? Nevermind I only need it to run locally and the fix mentioned above works fine.