Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular-route error Arguments to path.json must be strings

I am having a hard time figuring out what this error means. I have the following bower.json:

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

Upon installing my bower packages through bower install I get the following error:

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

Now, I have to mention that I have done the same thing for about a week, and everything was working correctly, with exactly the same setup. I have noticed that https://github.com/angular/angular.js has released a new version 1.2.20 recently, but even installing that I get the same error.

Some context: I am using nodejs, express and angular in my application. I can provide more info if needed (e.g., package.json, main server file). Any help would be highly appreciated.

like image 651
k88074 Avatar asked Jul 11 '14 20:07

k88074


1 Answers

See the answer here: Bower - error when installing package "Arguments to path.join must be strings"

Fix: bower cache clean and update to Bower 1.3.8.

like image 140
goldins Avatar answered Oct 22 '22 13:10

goldins