I've the steps on these two threads, but to no avail.
ERESOLVE unable to resolve dependency tree while installing a pacakge
Unable to resolve dependency tree error when installing npm packages
It's still giving me the same error on Heroku:
-----> Installing dependencies
Installing node modules
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @solana/wallet-adapter-material-ui@0.13.1
npm ERR! Found: @types/react@18.0.26
npm ERR! node_modules/@types/react
npm ERR! dev @types/react@"^18.0.17" from the root project
npm ERR! @types/react@"*" from @types/hoist-non-react-statics@3.3.1
npm ERR! node_modules/@types/hoist-non-react-statics
npm ERR! @types/hoist-non-react-statics@"*" from @types/styled-components@5.1.26
npm ERR! node_modules/@types/styled-components
npm ERR! dev @types/styled-components@"^5.1.15" from the root project
npm ERR! 3 more (@types/react-slick, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @material-ui/core@"^4.12.1" from @solana/wallet-adapter-material-ui@0.13.1
npm ERR! node_modules/@solana/wallet-adapter-material-ui
npm ERR! @solana/wallet-adapter-material-ui@"^0.13.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @types/react@17.0.52
npm ERR! node_modules/@types/react
npm ERR! peerOptional @types/react@"^16.8.6 || ^17.0.0" from @material-ui/core@4.12.4
npm ERR! node_modules/@material-ui/core
npm ERR! peer @material-ui/core@"^4.12.1" from @solana/wallet-adapter-material-ui@0.13.1
npm ERR! node_modules/@solana/wallet-adapter-material-ui
npm ERR! @solana/wallet-adapter-material-ui@"^0.13.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /tmp/npmcache.jlWS6/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npmcache.jlWS6/_logs/2022-12-07T22_37_42_614Z-debug-0.log
Here's by package.json
:
{
"name": "qtbotz-landing",
"version": "0.2.0",
"private": true,
"scripts": {
"lint": "next lint",
"lint:es": "eslint --ext .ts,.tsx .",
"lint:fix": "eslint --fix --ext .ts,.tsx .",
"dev": "open http://localhost:1337 && next dev -p 1337",
"start": "next start",
"build": "next build",
"clear-all": "rm -rf .next _static node_modules",
"re-start": "rm -rf .next _static node_modules && yarn install && yarn dev",
"re-build": "rm -rf .next _static node_modules && yarn install && yarn build",
"analyze": "ANALYZE=true next build"
},
"dependencies": {
"@emotion/react": "^11.10.0",
"@next/bundle-analyzer": "^12.0.2",
"@next/eslint-plugin-next": "^12.0.4",
"@project-serum/anchor": "^0.18.2",
"@solana/spl-token": "^0.1.8",
"@solana/wallet-adapter-base": "^0.7.0",
"@solana/wallet-adapter-material-ui": "^0.13.1",
"@solana/wallet-adapter-react": "^0.13.1",
"@solana/wallet-adapter-react-ui": "^0.6.1",
"@solana/wallet-adapter-wallets": "^0.11.3",
"@solana/web3.js": "^1.27.0",
"autoprefixer": "^10.4.8",
"axios": "^0.24.0",
"classnames": "^2.3.1",
"cross-env": "^7.0.3",
"express": "^4.17.2",
"jsonwebtoken": "^8.5.1",
"locomotive-scroll": "^4.1.4",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"next": "^12.0.2",
"next-compose-plugins": "^2.2.1",
"next-seo": "^4.28.1",
"next-transpile-modules": "^9.0.0",
"react": "^17.0.2",
"react-accessible-accordion": "^4.0.0",
"react-awesome-reveal": "^4.0.0",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-locomotive-scroll": "^0.2.2",
"react-marquee-slider": "^1.1.5",
"react-slick": "^0.29.0",
"react-star-sky": "^1.0.3",
"react-starfield-animation": "^1.0.1",
"shooting-stars": "^0.0.6",
"slick-carousel": "^1.8.1",
"smooth-scrollbar": "^8.7.5",
"smooth-scrollbar-react": "^2.3.0",
"stream": "^0.0.2",
"styled-components": "^5.3.5",
"styled-jsx-plugin-postcss": "^4.0.1",
"tailwindcss": "^2.2.19"
},
"devDependencies": {
"@types/jsonwebtoken": "^8.5.6",
"@types/node": "^16.11.9",
"@types/react": "^18.0.17",
"@types/react-slick": "^0.23.10",
"@types/react-vertical-timeline-component": "^3.3.1",
"@types/styled-components": "^5.1.15",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint": "<8.0.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^16.0.0",
"eslint-config-next": "^12.0.2",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unused-imports": "^2.0.0",
"lint-staged": "^12.0.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.3.11",
"prettier": "^2.4.1",
"rimraf": "^3.0.2",
"typescript": "^4.5.2"
},
"license": "ISC",
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
I've attempted to fix the problem by removing the node modules and the package.json, but every time I push to Heroku, the problem still arises.
It might be peer dependency issue, or an NPM issue but I wouldn't know where to start.
Thanks again, and let me know if you have any questions.