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

Error: Cannot find module 'es5-ext/object/normalize-options' #897

Open
goosecoid opened this issue Jun 19, 2024 · 1 comment
Open

Error: Cannot find module 'es5-ext/object/normalize-options' #897

goosecoid opened this issue Jun 19, 2024 · 1 comment

Comments

@goosecoid
Copy link

When trying to use the petstore example I get the following error:

 $ npx api install https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json

node:internal/modules/cjs/loader:1147
  throw err;
  ^

Error: Cannot find module 'es5-ext/object/normalize-options'
Require stack:
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/memoizee/index.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/samples/index.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/lib/get-mediatype-examples.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation/get-response-examples.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation/get-callback-examples.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/index.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/cli/commands/install.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/cli/commands/index.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/bin.js
- /Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/bin/api
    at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/memoizee/index.js:3:21)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/memoizee/index.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/samples/index.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/lib/get-mediatype-examples.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation/get-response-examples.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation/get-callback-examples.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/operation.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/oas/dist/index.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/cli/commands/install.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/cli/commands/index.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/dist/bin.js',
    '/Users/adrienblavier/.npm/_npx/334debcfbdc435a8/node_modules/api/bin/api'
  ]
}

Node.js v21.2.0

Already tried to

npm i es5-ext

Any ideas? Thanks.

@goosecoid
Copy link
Author

using npx [email protected] works fine

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