raml-javascript-generator icon indicating copy to clipboard operation
raml-javascript-generator copied to clipboard

require('raml-javascript-generator') fails on windows

Open cmorrisonSMS opened this issue 8 years ago • 1 comments

Hi,

I have done npm install raml-javascript-generator, however, when I attempt to actually require in the library in a script, it is failing:

This:

jsGen = require('raml-javascript-generator');
var output = jsGen.client("raw.raml");

Fails with this:

C:\devel\raml-generator-test
λ node .\index.js
module.js:341
    throw err;
    ^

Error: Cannot find module 'raml-javascript-generator'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\devel\raml-generator-test\index.js:1:71)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)

require('raml-javascript-generator/dist') appears to work (followed by other errors), but it not what the readme says, so seems incorrect.

Any help would be appreciated.

cmorrisonSMS avatar Apr 27 '16 00:04 cmorrisonSMS