Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gruntjs grunt-init grunfile throws error Fatal error: Arguments to path.join must be strings

Tags:

gruntjs

I am trying to set up a new project with gruntjs 0.4. I've uninstalled 0.3 and installed the grunt-cli and imported grunt-init gruntfile. when I run "grunt-init gruntfile" it runs the same as it did in 0.3 asking the normal questions

Please answer the following: [?] Is the DOM involved in ANY way? (Y/n) y [?] Will files be concatenated or minified? (Y/n) y [?] Will you have a package.json file? (Y/n) y [?] Do you need to make any changes to the above before continuing? (y/N) n

however after answering all the questions I get the error

Fatal error: Arguments to path.join must be strings

Has anyone else dealt with something similar or can you point me in the right direction to debug?

like image 462
Justin Avatar asked Mar 12 '13 15:03

Justin


3 Answers

It was a bug caused by a change in Node 0.10.0, and was fixed earlier today. Will be released soon.

like image 173
Sindre Sorhus Avatar answered Nov 18 '22 10:11

Sindre Sorhus


I just updated both grunt and grunt-cli

npm install grunt-cli
.
.
.
npm install grunt

and that fixed it for me

like image 25
climboid Avatar answered Nov 18 '22 10:11

climboid


if you're using 'bower'(A package manager for the web), I had the same issue, It turned that its a bower library error when try to install angular. I run the bower build separately like below

bower install angular

Then I selected the correct version, and it works for me.

like image 2
Tarek El-Mallah Avatar answered Nov 18 '22 12:11

Tarek El-Mallah