F:\Projects\codegena-test\update-typings.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at F:\Projects\codegena-test\node_modules\@codegena\oapi3ts-cli\bundles\codegena-oapi3ts-cli.umd.js:2:104
at Object. (F:\Projects\codegena-test\node_modules\@codegena\oapi3ts-cli\bundles\codegena-oapi3ts-cli.umd.js:5:2)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'F:\Projects\codegena-test\node_modules\@codegena\oapi3ts-cli\bundles\codegena-oapi3ts-cli.umd.js',
'F:\Projects\codegena-test\update-typings.js'
]
}
`
Where is problem?
Hi! I try generate code as described in readme. Create clear project and install codegena.
{ "name": "codegena-test", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@angular/common": "^8.2.14", "@angular/core": "^8.2.14", "@angular/platform-browser-dynamic": "^8.2.14", "@codegena/ng-api-service": "^2.1.5", "@codegena/oapi3ts": "^2.1.0", "@codegena/oapi3ts-cli": "^2.1.0", "core-js": "^3.6.3", "rxjs": "^6.5.4", "zone.js": "^0.10.2" } }
Create update-typings.js `"use strict";
var cliLib = require('@codegena/oapi3ts-cli'); var cliApp = new cliLib.CliApplication;
cliApp.createTypings(); // cliApp.createServices('angular');`
Run command as described for my simple Oapi definition:
node ./update-typings.js --srcPath ./openapi-defs.json --destPath ./lib --separatedFiles true
And get error: `node ./update-typings.js --srcPath ./openapi-defs.json --destPath ./lib --separatedFiles true internal/modules/cjs/loader.js:796 throw err; ^
Error: Cannot find module 'hash.js' Require stack: