GithubHelp home page GithubHelp logo

knx-ets5-ga-reader's People

Contributors

snowdd1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

knx-ets5-ga-reader's Issues

Got error with newest Node-Version

If you just clone the project, do a npm install and run the script as described in readme.md it will end up with the following error:

node:events:505
      throw er; // Unhandled 'error' event
      ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received 'utf-8'
←[90m    at maybeCallback (node:fs:177:3)←[39m
←[90m    at Object.writeFile (node:fs:2118:14)←[39m
    at D:\knx-ets5-ga-reader-master\test-file.js:54:8
    at Parser.<anonymous> (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:304:18)
←[90m    at Parser.emit (node:events:527:28)←[39m
    at SAXParser.onclosetag (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:262:26)
    at emit (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:624:35)
    at emitNode (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:629:5)
    at closeTag (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:889:7)
    at SAXParser.write (D:\knx-ets5-ga-reader-master\node_modules\←[4msax←[24m\lib\sax.js:1436:13)
Emitted 'error' event on Parser instance at:
    at Parser.exports.Parser.Parser.parseString (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:327:16)
    at Parser.parseString (D:\knx-ets5-ga-reader-master\node_modules\←[4mxml2js←[24m\lib\parser.js:5:59)
    at D:\knx-ets5-ga-reader-master\test-file.js:25:10
←[90m    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)←[39m {
  code: ←[32m'ERR_INVALID_CALLBACK'←[39m
}

To be compatible with newest node version and the current fs package you need to specify a callback function like:

fs.writeFile(__dirname + '/'+ config.niceReadableTestFile,  JSON.stringify(groupAddresses, undefined, 4), 'utf-8', function(err) {
     if(err) {
          console.log('Cant write to file');
     }
});

-closed

Hello Snowdd1.

Ignore this please. I made a mistake. I thought your reader is also for the knx protocol xml file.
I am sorry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.