I am writing a library to send some information to a PLC with an industrial protocol. I am using bunyan to debug nicely my code. Unfortunately, this library is using the fs library and when this line is executed:
var fs = require('fs');
I get in fact an empty object:
{}
I try to use as in your example the library brfs but it's still not working and I really don't know what to do.
Chrome 45.0.2454 (Windows 8 0.0.0) Device client1 should expose the default attributes FAILED
TypeError: fs.createWriteStream is not a function
at Logger.addStream (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:3804:27 <- node_modules/bunyan/lib/bunyan.js:535:0)
at C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:3687:18 <- node_modules/bunyan/lib/bunyan.js:418:0
at Array.forEach (native)
at new Logger (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:3686:25 <- node_modules/bunyan/lib/bunyan.js:417:0)
at Function.createLogger (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:4709:12 <- node_modules/bunyan/lib/bunyan.js:1440:0)
at new Client (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:3253:3513 <- adsNodeClient.js:9:0)
at Object.<anonymous> (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:4792:20 <- test/client.spec.js:9:0)
TypeError: Cannot read property 'host' of undefined
at Object.<anonymous> (C:/Users/CYRILL~1/AppData/Local/Temp/61fea9cca908ba322c87aefe7df1a9ff.browserify:4812:24 <- test/client.spec.js:29:0)
Chrome 45.0.2454 (Windows 8 0.0.0): Executed 1 of 1 (1 FAILED) ERROR (0.059 secs / 0.006 secs)
03 10 2015 02:44:34.304:DEBUG [coverage]: Writing coverage to D:/Documents/Github/adsNodeClient/coverage/Chrome 45.0.2454 (Windows 8 0.0.0)
Yes I am working on windows and yes I know it's not the best to dev but in industrial engineering not a lot of softwares is running under linux or mac.
Hello!
I am writing a library to send some information to a PLC with an industrial protocol. I am using bunyan to debug nicely my code. Unfortunately, this library is using the fs library and when this line is executed:
I get in fact an empty object:
I try to use as in your example the library brfs but it's still not working and I really don't know what to do.
Here is my karma.conf.js:
Here is my package.json:
Here is the stack trace of the error:
Yes I am working on windows and yes I know it's not the best to dev but in industrial engineering not a lot of softwares is running under linux or mac.