Concurrency issues
sheerun opened this issue · comments
Adam Stankiewicz commented
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)
Adam Stankiewicz commented
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?
Sindre Sorhus commented
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.