ibm-cloud-solutions / hubot-ibmcloud-cognitive-lib

Provides helper functions for configuring, storing, and processing information related to natural language processing of a statement
http://www.ibm.com/
Other
0 stars 0 forks source link

npm install failure due to postInstall script #13

Closed ycao56 closed 8 years ago

ycao56 commented 8 years ago

For those modules with nlc capabilities, postInsall: initDb src/nlc/NLC.json has been added in order to initialize the db automatically after install. If user install it twice, it will fail with below errors

initDb src/nlc/NLC.json

{ [conflict: Document update conflict] status: 409, name: 'conflict', message: 'Document update conflict', error: true }

ycao56 commented 8 years ago

https://github.com/ibm-cloud-solutions/hubot-ibmcloud-cognitive-lib/blob/master/src/lib/initDb.js#L114 exits the process and fails the install

ycao56 commented 8 years ago

@normanb I previously talked to @jlpadilla about this. Can you take a look? Can we throw a warning instead of failing the install when db already exists?

normanb commented 8 years ago

yes, definitely. I can change that.

On Fri, Aug 5, 2016 at 3:35 PM, Yu Cao notifications@github.com wrote:

@normanb https://github.com/normanb I previously talked to @jlpadilla https://github.com/jlpadilla about this. Can you take a look? Can we throw a warning instead of failing the install when db already exists?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ibm-cloud-solutions/hubot-ibmcloud-cognitive-lib/issues/13#issuecomment-237942865, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ67VP33bzi6ju2sRm3P6JhGVO7Xbmaks5qc5BrgaJpZM4Jd_il .