I have tried both v14.18.0 and v18.0.0, both have this issue.
Language : typescript Version 4.1.3
Framework: next 12.1.5
moralis : 1.5.10
react-moralis : 1.3.5
Module not found: Can’t resolve ‘@solana/web3.js’
package.json:
{
"name": "moralis-dashboard6",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@chakra-ui/react": "^1.8.8",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@walletconnect/web3-provider": "^1.7.7",
"@web3auth/web3auth": "^0.9.3",
"framer-motion": "^6",
"magic-sdk": "7.0.0",
"moralis": "^1.5.10",
"next": "^12.1.5",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-icons": "^4.3.1",
"react-moralis": "^1.3.5",
"suncalc": "^1.9.0"
},
"devDependencies": {
"@types/node": "17.0.25",
"@types/react": "18.0.5",
"@types/react-dom": "18.0.1",
"@types/suncalc": "^1.8.1",
"eslint": "8.13.0",
"eslint-config-next": "12.1.5",
"typescript": "4.6.3"
}
}
Before run yarn add @solana/web3.js
, I want to know, why this happened?
There is no any code, related with solana, in my project.
And I am sure that, it is MoralisProvider which caused this issue.
Removed it, this issue disappeared.