Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrency issues #22

Closed
sheerun opened this issue Apr 16, 2014 · 2 comments
Closed

Concurrency issues #22

sheerun opened this issue Apr 16, 2014 · 2 comments

Comments

@sheerun
Copy link

sheerun commented Apr 16, 2014

This plugin introduces concurrency issues in bower.

I received error when running following script with this bower.json:

{
    "name": "myApp",
    "version": "0.1.0",
    "dependencies": {
        "angular": "latest",
        "angular-bootstrap": "0.10.0",
        "angular-cookies": "latest",
        "angular-ui-router": "#master",
        "auth0.js": "https://github.com/auth0/auth0.js.git#v2.0.10",
        "auth0-angular": "latest",
        "bootstrap": "3.0.3"
    }
}
for i in {1..10}; do (mkdir $i && cp bower.json $i/bower.json && cd $i && bower install) & done
/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/configstore.js:89
        delete config[key];
                      ^
TypeError: Cannot convert null to object
    at Object.Configstore.del (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/configstore.js:89:16)
    at process.<anonymous> (/usr/local/lib/node_modules/bower/node_modules/insight/lib/push.js:16:9)
    at process.EventEmitter.emit (events.js:98:17)
    at handleMessage (child_process.js:318:10)
    at Pipe.channel.onread (child_process.js:345:11)

TypeError: Cannot read property 'clientId' of null
    at Object.Configstore.get (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/configstore.js:78:17)
    at Insight.Object.defineProperty.get (/usr/local/lib/node_modules/bower/node_modules/insight/lib/insight.js:40:22)
    at Insight.module.exports.google (/usr/local/lib/node_modules/bower/node_modules/insight/lib/providers.js:19:13)
    at Insight.getRequest (/usr/local/lib/node_modules/bower/node_modules/insight/lib/insight.js:68:42)
    at async.forEachSeries.q2 (/usr/local/lib/node_modules/bower/node_modules/insight/lib/push.js:23:19)
    at iterate (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/async/lib/async.js:134:13)
    at /usr/local/lib/node_modules/bower/node_modules/insight/node_modules/async/lib/async.js:145:25
    at Request._callback (/usr/local/lib/node_modules/bower/node_modules/insight/lib/push.js:27:4)
    at Request.self.callback (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/request/request.js:129:22)
    at Request.EventEmitter.emit (events.js:98:17)
@sheerun
Copy link
Author

sheerun commented Apr 16, 2014

Additionally it removed all configuration so upon next execution of bower I got:

May bower anonymously report usage statistics to improve the tool over time?

@sindresorhus
Copy link
Owner

This is an issue with configstore. config should always be an object, so clearly something wrong there. Can you make sure it's the latest configstore? And then open it over there instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants