Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 21914  / 2 Years ago, wed, august 24, 2022, 2:49:18

How does one install grunt on Ubuntu 13.04?



I've attempted to install it via NPM:



sudo npm install -g grunt


Then when i run grunt:



grunt


But it doesn't seem to work it throws an error:



path.js:313
throw new TypeError('Arguments to path.resolve must be strings');
^ TypeError: Arguments to path.resolve must be strings
at Object.exports.resolve (path.js:313:15)
at Object.<anonymous> (/usr/local/lib/node_modules/grunt/bin/grunt:13:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3


Here's some information about what version of node i have:



$ npm -v                                                                      
1.3.8

More From » nodejs

 Answers
5

Looks like the error occurs when there are two versions of grunt.



To find out if you have two versions of grunt installed you run in CLI:



where grunt or which grunt



If you see more than one version of grunt:



/usr/local/bin/grunt
/usr/bin/grunt
/usr/local/bin/grunt
/usr/bin/grunt


Then you just remove one of them:



rm /usr/local/bin/grunt


Wrote a post on this for more information.


[#29742] Thursday, August 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tudatchful

Total Points: 270
Total Questions: 109
Total Answers: 122

Location: Palau
Member since Tue, May 30, 2023
1 Year ago
;