Open kecampcr opened 3 years ago
I have no idea why is running on codesandbox and i have this error
The i --force
does absolutely nothing to fix this.
got the same issue
Try this:
npm install --legacy-peer-deps
It works but you'll get [ERR_PACKAGE_PATH_NOT_EXPORTED]
error when running next
command for viewing the dashboard. And it looks like that's a dead end :(
nextjs-material-dashboard@1.1.0 dev next
Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/parser' is not defined by "exports" in D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\node_modules\postcss\package.json at exportsNotFound (node:internal/modules/esm/resolve:294:10) at packageExportsResolve (node:internal/modules/esm/resolve:641:9) at resolveExports (node:internal/modules/cjs/loader:591:36) at Module._findPath (node:internal/modules/cjs/loader:668:31) at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27) at Module._load (node:internal/modules/cjs/loader:985:27) at Module.require (node:internal/modules/cjs/loader:1235:19) at require (node:internal/modules/helpers:176:18) at 552 (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:11590) at webpack_require (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:11735) at 270 (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:400) at webpack_require (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:11735) at 327 (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:260) at webpack_require (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:11735) at 845 (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:3733) at webpack_require (D:\devnolife\waBomers\nextjs-material-dashboard\node_modules\next\dist\compiled\postcss-scss\scss-syntax.js:1:11735) { code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
i use nodejs v20
Version
1.1.0
Reproduction link
https://codesandbox.io/s/currying-morning-6ejk6?file=/pages/_app.js
Operating System
Linux
Device
LenovoThinkPad
Browser & Version
Mozilla Firefox 90.0.2 (64-bit)
Steps to reproduce
What is expected?
Success all package installed
What is actually happening?
[kecamp@sabpkecamp nextjs-material-dashboard]$ npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: nextjs-material-dashboard@1.1.0 npm ERR! Found: react@17.0.1 npm ERR! node_modules/react npm ERR! react@"17.0.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^0.14.9 || ^15.0.0 || ^16.0.0" from react-chartist@0.14.3 npm ERR! node_modules/react-chartist npm ERR! react-chartist@"0.14.3" 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 /home/kecamp/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! /home/kecamp/.npm/_logs/2021-08-01T22_43_44_878Z-debug.log
Solution
Additional comments