Internal loader error in latest npm install
See original GitHub issueversion used: @redocly/openapi-cli@1.0.0-alpha.10
npm version: npm@6.14.5
Installation method: npm install -g @redocly/openapi-cli
[as per README]
Error during validate:
$ openapi validate openapi.yaml
internal/modules/cjs/loader.js:1033
throw err;
^
Error: Cannot find module 'outdent'
Require stack:
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/redocly/index.js
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/common/registry-dependencies.js
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/oas3/index.js
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/builtin.js
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/config/config.js
- /usr/local/lib/node_modules/@redocly/openapi-cli/lib/cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
at Function.Module._load (internal/modules/cjs/loader.js:899:27)
at Module.require (internal/modules/cjs/loader.js:1090:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@redocly/openapi-cli/lib/redocly/index.js:18:19)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Module.require (internal/modules/cjs/loader.js:1090:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/redocly/index.js',
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/common/registry-dependencies.js',
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/oas3/index.js',
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/rules/builtin.js',
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/config/config.js',
'/usr/local/lib/node_modules/@redocly/openapi-cli/lib/cli.js'
]
}
Could you please suggest a workaround or fix this ASAP??
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
node:internal/modules/cjs/loader:942 throw err; ^ Error
You need to install express as the error is showing that express is missing. The command for that shall be npm install express...
Read more >npm internal/modules/cjs/loader.js:883 throw err; ^ Error
Run This command: rm -rf node_modules package-lock.json && npm install && npm start but this command is also giving error 'rm' is not...
Read more >Common errors
You are trying to install on a drive that either has no space, or has no permission to write. Free some disk space...
Read more >ts-loader
TypeScript loader for webpack. Latest version: 9.4.2, last published: a month ago. Start using ts-loader in your project by running `npm i ...
Read more >new-error
nodeDevHook [as .ts] (new-error/node_modules/ts-node-dev/lib/hook.js:61:7)\n' + ' at Module.load (internal/modules/cjs/loader.js:1002:32)\n' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We have found a workaround for the time being with
npx
. Just specifying an older version:Btw, the latest alpha.11 fixes the issue with outdent.