koshevy / codegena

Tools for codegeneration from OAS3 to TypeScript. Actual Roadmap published — https://github.com/koshevy/codegena/blob/codegena-3.x/ROADMAP.md
https://codegena-playground.stackblitz.io/
MIT License
38 stars 1 forks source link

Dependencies are not installing correct #6

Closed debagger closed 4 years ago

debagger commented 4 years ago

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:

koshevy commented 4 years ago

Thank you for your report! You did it right, it's a bug. It's has to be fixed in a hour or two.

koshevy commented 4 years ago

@debagger Fixed, please try again. Please be noticed README changed a bit.