Error: Cannot find module 'wyvern-schemas/dist/types'
See original GitHub issueHi I got this error while trying to use the sdk.
node:internal/modules/cjs/loader:933
const err = new Error(message);
^
Error: Cannot find module 'wyvern-schemas/dist/types'
Require stack:
- /root/dev//node_modules/opensea-js/lib/utils/schema.js
- /root/dev//node_modules/opensea-js/lib/utils/index.js
- /root/dev//node_modules/opensea-js/lib/orders/utils.js
- /root/dev//node_modules/opensea-js/lib/api.js
- /root/dev//node_modules/opensea-js/lib/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/root/dev/openseaarb/node_modules/opensea-js/lib/utils/schema.js:26:15)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/root/dev/openseaarb/node_modules/opensea-js/lib/utils/index.js:13:14)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/root/dev/openseaarb/node_modules/opensea-js/lib/utils/schema.js',
'/root/dev/openseaarb/node_modules/opensea-js/lib/utils/index.js',
'/root/dev/openseaarb/node_modules/opensea-js/lib/orders/utils.js',
'/root/dev/openseaarb/node_modules/opensea-js/lib/api.js',
'/root/dev/openseaarb/node_modules/opensea-js/lib/index.js'
]
}
here are my dependecies
"dependencies": {
"opensea-js": "^4.0.3",
"web3": "^1.7.4"
}
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:16
Top Results From Across the Web
wyvern-schemas - npm
Start using wyvern-schemas in your project by running `npm i ... There are no other projects in the npm registry using wyvern-schemas.
Read more >How do I resolve "Cannot find module" error using Node.js?
Using npm install installs the module into the current directory only (in a subdirectory called node_modules ). Is app.js located under ...
Read more >Fix Global Installs Not Working | "Cannot find module" error FIX
Getting " Cannot find module " after installing something globally (with -g)? Well, this video shows you how to fix global package/module ...
Read more >Untitled
#in Errors in thinking are called! Lateinunterricht filme, Bezo washington post, Tropical island tyskland wiki! Lavasas receptas, Schlagel manufacturing, ...
Read more >packages by category | Hackage - Haskell.org
hyraxAbif library, program and test: Modules for parsing, generating and manipulating ... library and test: Describe schemas for your Haskell data types.
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 FreeTop 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
Top GitHub Comments
On my side, the issue was caused by the missing dist folder when pulling wyvern-schemas from Github. If you look at
node_modules/wyvern-schemas
, it will be missing the dist folder.I also didn’t want to npm/yarn install wyvern-schema since it would install 0.6.5 from npm which dates back five years ago instead of the fork of it referenced here in the package.json
The solution on my side ended up having to install yarn (not yarn install, just install it through
npm i -g yarn
). Once yarn was installed on my machine (or ci server), I simply deletednode_modules/wyvern-schemas
, rannpm install
again, and the dist folder that I mentioned above is now properly generated.Could it be caused by the fact that wyvern-schemas fork has a prepublish script that calls a bash script that calls yarn? Would be nice to fix that script to accept either yarn or npm. Or run it though npx?
It works! Thanks