升级到 nodejs 0.10.0 和 npm 1.2.14 后,如果我尝试创建 webapp,yeoman 1.0 beta 会失败:
$ yo webapp
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.<anonymous> (/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)
节点安装在/opt/nodejs/node-v0.10.0-linux-x64
. NODE_PATH
环境变量指向该路径:
$ echo $NODE_PATH
/opt/nodejs/node-v0.10.0-linux-x64
甚至yo init
失败并出现相同的错误。
有什么建议吗?