Closed cfjedimaster closed 9 years ago
@cfjedimaster We don't create files in the wrapper/library. Are you using the sample app?
Nope. I'm using this: https://github.com/cfjedimaster/IonicBluemixDemo
I basically commented out more and more of my app.js file and narrowed it down to that part.
So, I just made all fs.write* functions log a stack trace, and it looks like it's coming from this: https://github.com/jprichardson/string.js/blob/master/lib/string.js#L726 which is in one of the watson-developer-cloud dependencies. I'm not exactly sure what they're trying to do there, but I don't think they're doing it, so I'm going to file a bug on that repo and link to this one.
Muchas gracias.
On Wed, Aug 5, 2015 at 1:06 PM, Nathan Friedly notifications@github.com wrote:
So, I just made all fs.write* functions log a stack trace, and it looks like it's coming from this: https://github.com/jprichardson/string.js/blob/master/lib/string.js#L726 which is in one of the watson-developer-cloud dependencies. I'm not exactly sure what they're trying to do there, but I don't think they're doing it, so I'm going to file a bug on that repo and link to this one.
— Reply to this email directly or view it on GitHub https://github.com/watson-developer-cloud/nodejs-wrapper/issues/56#issuecomment-128094205 .
Raymond Camden, Developer Advocate for MobileFirst at IBM
Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden
Thanks @nfriedly, lets keep this bug open until they fix it.
Nice debugging @nfriedly! Thanks for the report, @cfjedimaster.
BTW, since @jsstylos asked about it, this is the code to make all fs.write* methods log a stack trace: https://gist.github.com/nfriedly/5813c0fcea944f05ccfe
So, it looks like this is a bug in the interaction between shelljs and string.js - https://github.com/cfjedimaster/IonicBluemixDemo/pull/1 has a simple workaround of just loading string.js first (you'll have to delete node_modules
and reinstall though, I moved string.js to a top-tier dependency to make it work.)
Wow, you certainly didn't need to file a PR to fix it for me on my side too. Thank you. :)
On Wed, Aug 5, 2015 at 1:40 PM, Nathan Friedly notifications@github.com wrote:
So, it looks like this is a bug in the interaction between shelljs and string.js - cfjedimaster/IonicBluemixDemo#1 https://github.com/cfjedimaster/IonicBluemixDemo/pull/1 has a simple workaround of just loading string.js first (you'll have to delete node_modules and reinstall though, I moved string.js to a top-tier dependency to make it work.)
— Reply to this email directly or view it on GitHub https://github.com/watson-developer-cloud/nodejs-wrapper/issues/56#issuecomment-128103710 .
Raymond Camden, Developer Advocate for MobileFirst at IBM
Email : raymondcamden@gmail.com Blog : www.raymondcamden.com Twitter: raymondcamden
Yea, it looks like they're adding a workaround to string.js so you can just ignore that PR. I mostly did it to see if that was indeed the issue. And then since I already did the work, I figured I might as well make it available ;)
@germanattanasio its fixed in 3.3.1
of string.js
thanks @az7arul!
I noticed my node app was creating a file called "string" with the contents: testtest
I narrowed it down to the init portion of this library:
var visual_recognition = watson.visual_recognition({ username: 'stuff', password: 'more stuff', version: 'v1' });