angular-route error对path.json的参数必须是字符串

时间:2014-07-11 20:32:32

标签: json node.js angularjs express bower-install

我很难弄清楚这个错误意味着什么。 我有以下bower.json

    ...
"dependencies":{
"angular-route":"~1.2.18",
"angular":"~1.2.18"
}

通过bower install安装我的凉亭包时出现以下错误:

bower angular-route#~1.2.20      error Arguments to path.join must be strings
Stack trace:
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 GitHubResolver._checkout (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/core/resolvers/GitHubResolver.js:54:21)
    at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/core/resolvers/GitResolver.js:69:21
    at _fulfilled (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:760:13)
    at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:574:44
    at flush (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/p-throttler/node_modules/q/q.js:108:17)
Console trace:
Trace
    at StandardRenderer.error (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/renderers/StandardRenderer.js:72:17)
    at Logger.<anonymous> (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/bin/bower:111:22)
    at Logger.EventEmitter.emit (events.js:95:17)
    at Logger.emit (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
    at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/lib/commands/index.js:40:20
    at _rejected (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:797:24)
    at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:823:30
    at Promise.when (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:1035:31)
    at Promise.promise.promiseDispatch (/home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:741:41)
    at /home/ubuntu/.nvm/v0.10.26/lib/node_modules/bower/node_modules/q/q.js:557:44
System info:
Bower version: 1.3.7
Node version: 0.10.26
OS: Linux 3.13.0-29-generic x64

现在,我必须提到我已经做了大约一个星期的同样的事情,一切都正常,设置完全相同。 我注意到https://github.com/angular/angular.js最近发布了新版本1.2.20,但即使安装我也会遇到同样的错误。

某些上下文:我在我的应用程序中使用nodejs,express和angular。如果需要,我可以提供更多信息(例如,package.json,主服务器文件)。 任何帮助都将受到高度赞赏。

1 个答案:

答案 0 :(得分:4)

请在此处查看答案:Bower - error when installing package "Arguments to path.join must be strings"

修复:bower cache clean并更新为Bower 1.3.8。