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

Fatal module loading error when running create-models cli #1

Open
prometheas opened this issue Aug 30, 2020 · 1 comment
Open

Fatal module loading error when running create-models cli #1

prometheas opened this issue Aug 30, 2020 · 1 comment

Comments

@prometheas
Copy link

I ran into the following error when running the command:

> npx create-models -u https://hostname-redacted.com/openapi.json -o ./src/models
Cannot find module '../lib/processFunc'
Require stack:
- ~/Git Repositories/AppRedacted/node_modules/models-from-swagger/bin/create-models.js
@prometheas
Copy link
Author

prometheas commented Aug 30, 2020

OK, I've found the problem: the package was published to npm with the src directory, rather than the "compiled" lib directory. I'm betting this is because the the lack of a .npmignore file caused npm to use the .gitignore file when you published the package to npm (more info).

prometheas added a commit to prometheas/FORK--models-from-swagger that referenced this issue Aug 30, 2020
This fixes a fatal module loader error the package published to NPM, as
reported in issue MrObe13#1.
prometheas added a commit to prometheas/FORK--models-from-swagger that referenced this issue Aug 30, 2020
This fixes a fatal module loader error the package published to NPM, as
reported in issue MrObe13#1.
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

1 participant