creativetimofficial / nextjs-material-dashboard

NextJS version of Material Dashboard React
https://demos.creative-tim.com/nextjs-material-dashboard/admin/dashboard
MIT License
296 stars 592 forks source link

[Bug] Installation Errors after download #7

Open kecampcr opened 3 years ago

kecampcr commented 3 years ago

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

  1. Download or clone code
  2. Go to terminal
  3. Run npm install or yarn install (I use yarn)

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

kecampcr commented 3 years ago

I have no idea why is running on codesandbox and i have this error

tylerlazenby commented 2 years ago

The i --force does absolutely nothing to fix this.

Tavee-adam commented 2 years ago

got the same issue

arshaan-abh commented 1 year ago

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 :(

devnolife commented 9 months ago

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