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

yarn add web3.storage, but module not found #2316

Open
hauchu1998 opened this issue Oct 6, 2023 · 2 comments
Open

yarn add web3.storage, but module not found #2316

hauchu1998 opened this issue Oct 6, 2023 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@hauchu1998
Copy link

Hey

I'm trying to upload images to IPFS through web3.storage pkg on my NextJS app. I install it with yarn add web3.storage, and I'm pretty sure that it exist in the node_modules. But, when I import it, it still show Cannot find module 'web3.storage' or its corresponding type declarations.. Anyone know how to fix?

yarn: 1.22.19
node: 18.12.0
npm: 8.19.2
nextjs: v13
image

package.json

"dependencies": {
"@privy-io/wagmi-connector": "^0.1.4",
"@wagmi/chains": "^1.8.0",
"@web3modal/ethereum": "^2.7.1",
"@web3modal/react": "^2.7.1",
"@xmtp/content-type-reaction": "^1.1.1",
"@xmtp/content-type-read-receipt": "^1.1.2",
"@xmtp/content-type-remote-attachment": "^1.1.1",
"@xmtp/content-type-reply": "^1.1.2",
"@xmtp/react-components": "1.0.0-preview.0",
"@xmtp/react-sdk": "^1.3.7",
"@xmtp/xmtp-js": "^11.0.0",
"date-fns": "^2.30.0",
"interweave": "^13.1.0",
"interweave-autolink": "^5.1.0",
"interweave-emoji": "^7.0.0",
"minimist": "^1.2.5",
"next": "latest",
"react": "latest",
"react-blockies": "^1.4.1",
"react-dom": "latest",
"react-icons": "^4.11.0",
"react-media-recorder-2": "^1.6.23",
"react-timer-hook": "^3.0.7",
"react-virtuoso": "^4.6.0",
"viem": "^1.14.0",
"wagmi": "^1.4.2",
"web3.storage": "4.5.5",
"zustand": "^4.4.3"
},

@hauchu1998 hauchu1998 added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Oct 6, 2023
@wslyvh
Copy link

wslyvh commented Oct 15, 2023

Try changing moduleResolution in your tsconfig to 'node'

"compilerOptions": {
    "moduleResolution": "node",
  },

@shameelsadaka
Copy link

Same issue here. Why it is happening ? Anyway to solve it without changing moduleResolution config ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

3 participants