April 09, 2013

Yeoman : TypeError('Arguments to path.join must be strings');

Edit : Node 0.10 is now fully supported (working with a 0.10.17 right now) - keeping the old thread for archive. However, I had the error described below with the default Ubuntu 12.04 LTS node version (0.11-pre something) 


Hi all,

Today I was playing with this great Yeoman tool. Basically it's a scaffolding tool (yo) combined with a building (grunt) and dependency manager tool (bower) for building front end apps.



That tool (or that tooling set) is really, really great and you should check it out.

Set up is really easy, everything is packaged as Node.js modules. Only thing I didn't see first when installing the stack : Node.js is fully supported until version 0.8.x for now. Running a higher version (0.10 in my case) will lead to problems like this

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object. (/opt/nodejs/node-v0.10.0-linux-x64/lib/node_modules/yo/node_modules/yeoman-generator/node_modules/bower/lib/core/config.js:41:22)
    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 Module.require (module.js:364:17)
    at require (module.js:380:17)


This error doesn't come right away, I had it when trying to use the angular generator (angular:route) to be precise.

Hope this help.

No comments:

Post a Comment