corenova / yang-express

YANG model-driven Express framework
Apache License 2.0
12 stars 4 forks source link

Facing errors while trying to run yang-express #11

Open govindthakur25 opened 4 years ago

govindthakur25 commented 4 years ago

Hi There,

I was trying to integrate a yang-parser in an Angular (v9) application, for which I resorted to using yang-express. After installing I ran below command:

yang-express src/app/yangs/demo.yang 

It yields below output, the issue it's pointing to is in the yang-express file inside the bin folder.

WARNING: No configurations found in configuration directory:/home/yang-demo/config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
/usr/local/lib/node_modules/yang-express/bin/yang-express:37
var schema = require('..').bind({
                           ^

TypeError: require(...).bind is not a function
    at Object.<anonymous> (/usr/local/lib/node_modules/yang-express/bin/yang-express:37:28)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

I am running node version 10.19.0 and npm 6.14.4. Please provide your thoughts.