Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJS Inheritance_Manager is not defined #7

Open
pedro93 opened this issue Jul 6, 2017 · 2 comments
Open

NodeJS Inheritance_Manager is not defined #7

pedro93 opened this issue Jul 6, 2017 · 2 comments

Comments

@pedro93
Copy link

pedro93 commented Jul 6, 2017

Npm module does not work with NodeJS. I'm using node v.8.0.0 but i think thats irrelevant.
You can try it out with this code snippet:

var EXI4JSON = require("exificient.js");
console.log(EXI4JSON);

Result:

▶ node index.js
/home/pedro.cardoso/dev/test/node_modules/exificient.js/exificient-for-json.js:7
Inheritance_Manager.extend(EXI4JSONDecoder, EXIDecoder);
^

ReferenceError: Inheritance_Manager is not defined
    at Object.<anonymous> (/home/pedro.cardoso/dev/test/node_modules/exificient.js/exificient-for-json.js:7:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/pedro.cardoso/dev/test/index.js:1:78)
    at Module._compile (module.js:569:30)
@danielpeintner
Copy link
Member

I can confirm this issue. Will try to look into it as soon as possible..

@danielpeintner
Copy link
Member

Latest release v0.0.5 of exificient.js resolves that problem. Please let me know if you encounter other issues.

After
npm install exificient.js

the following sample code works

var EXI4JSON = require("exificient.js");
console.log(EXI4JSON);

var jsonObjIn = JSON.parse('{"Test": null}');
console.log(jsonObjIn);

// encode
var uint8Array = EXI4JSON.exify(jsonObjIn);
console.log("Number of Bytes: " + uint8Array.length);

// decode
var jsonObjOut = EXI4JSON.parse(uint8Array);
console.log("Out: " + JSON.stringify(jsonObjOut));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants