Error: Cannot find module 'es5-ext/object/normalize-options'
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 697
- Forks
- 31
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 10
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the reported npx api install command and Node.js 21.2.0. Trace the dependency path through api/dist/cli/commands/install.js, oas/dist/samples/index.js, and memoizee/index.js, then verify the command completes without the es5-ext/object/normalize-options error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100