ensdomains / ensjs

ENS javascript library for contract interaction
MIT License
117 stars 54 forks source link

Module not found: Error: Can't resolve 'graphql/language' #131

Closed rahuldasgupta closed 8 months ago

rahuldasgupta commented 1 year ago

Getting this error package.json

{
 "@ensdomains/ensjs": "^3.0.0-alpha.58",
 "ethers": "^5.7.2",
 "graphql": "^16.6.0",
 "stream": "^0.0.2",
 "typescript": "^4.9.3",
 "wagmi": "^0.7.14",
}
ERROR in ./node_modules/@ensdomains/ensjs/dist/esm/GqlManager.mjs 73:77-103

Module not found: Error: Can't resolve 'graphql/language' in 'C:\Projects\verity_web\node_modules\@ensdomains\ensjs\dist\esm'
Did you mean 'index.mjs'?
BREAKING CHANGE: The request 'graphql/language' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

image

Magofoco commented 1 year ago

Try this: 1) Remove node_modules 2) Remove package-lock.json 3) In package.json remove graphql (if you have it) 4) Run npm i --save graphql 5) Run npm install