gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 932 forks source link

Unable to install mui-datatables #1658

Open roger-appleby opened 3 years ago

roger-appleby commented 3 years ago

I ran the npm install and received dependency errors both the core and the icons installed fine

Expected Behavior

Install without issues

Current Behavior

fails to install
Relevant details are below

Steps to Reproduce (for bugs)

I installed this on another machine which has verbose npm  v6.14.11 node v14.15.4 successfully
The new machine has npm  v7.5.3

Your Environment

0 verbose cli [ 0 verbose cli 'C:\Program Files\nodejs\node.exe', 0 verbose cli 'install', 0 verbose cli 'mui-datatables', 0 verbose cli '--save' 0 verbose cli ] 1 info using npm@7.5.3 2 info using node@v14.15.5 3 timing config:load:defaults Completed in 2ms 4 timing config:load:file:C:..\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 2ms 5 timing config:load:builtin Completed in 2ms 6 timing config:load:cli Completed in 2ms 7 timing config:load:env Completed in 1ms 9 timing config:load:project Completed in 1ms 10 timing config:load:file:C:...npmrc Completed in 1ms 11 timing config:load:user Completed in 1ms 13 timing config:load:global Completed in 1ms 14 timing config:load:cafile Completed in 0ms 15 timing config:load:validate Completed in 1ms 16 timing config:load:setUserAgent Completed in 0ms 17 timing config:load:setEnvs Completed in 1ms 18 timing config:load Completed in 13ms 19 verbose npm-session 355e7a0acf32f5ed 20 timing npm:load Completed in 24ms 21 timing arborist:ctor Completed in 1ms 22 timing idealTree:init Completed in 920ms 23 timing idealTree:userRequests Completed in 2ms 24 silly idealTree buildDeps 25 silly fetch manifest mui-datatables@ 26 timing arborist:ctor Completed in 0ms 27 http fetch GET 304 http://registry.npmjs.org/mui-datatables 1111ms (from cache) 28 silly fetch manifest @material-ui/core@^4.11.3 29 http fetch GET 304 http://registry.npmjs.org/@material-ui%2fcore 206ms (from cache) 30 silly fetch manifest @types/react@^16.8.6 || ^17.0.0 31 http fetch GET 304 http://registry.npmjs.org/@types%2freact 152ms (from cache) 32 silly fetch manifest react@^17.0.1 33 http fetch GET 304 http://registry.npmjs.org/react 148ms (from cache) 34 silly fetch manifest react-dom@^17.0.1 35 http fetch GET 304 http://registry.npmjs.org/react-dom 159ms (from cache) 36 silly fetch manifest @material-ui/icons@^4.11.2 37 http fetch GET 304 http://registry.npmjs.org/@material-ui%2ficons 217ms (from cache) 38 timing idealTree Completed in 2943ms 39 timing command:install Completed in 2952ms 40 verbose stack Error: unable to resolve dependency tree 40 verbose stack at Arborist.[failPeerConflict] (C:..\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1116:25) 40 verbose stack at Arborist.[loadPeerSet] (C:..\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1109:30) 40 verbose stack at async Arborist.[buildDepStep] (C:..\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:825:11) 40 verbose stack at async Arborist.buildIdealTree (C:..\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7) 40 verbose stack at async Promise.all (index 1) 40 verbose stack at async Arborist.reify (C:..\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:127:5) 40 verbose stack at async install (C:..\AppData\Roaming\npm\node_modules\npm\lib\install.js:38:3) 41 verbose cwd C:\javascriptProjects\asset-planning-tool 42 verbose Windows_NT 10.0.17763 43 verbose argv "C:\Program Files\nodejs\node.exe" "C:..\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "mui-datatables" "--save" 44 verbose node v14.15.5 45 verbose npm v7.5.3 46 error code ERESOLVE 47 error ERESOLVE unable to resolve dependency tree 48 error 49 error While resolving: [1masset-planning-tool[22m@[1m0.1.0[22m 49 error Found: [1mreact[22m@[1m17.0.1[22m[2m[22m 49 error [2mnode_modules/react[22m 49 error [1mreact[22m@"[1m^17.0.1[22m" from the root project 49 error [35mpeer[39m [1mreact[22m@"[1m^16.8.0 || ^17.0.0[22m" from [1m@material-ui/core[22m@[1m4.11.3[22m[2m[22m 49 error [2mnode_modules/@material-ui/core[22m 49 error [1m@material-ui/core[22m@"[1m^4.11.3[22m" from the root project 49 error [35mpeer[39m [1m@material-ui/core[22m@"[1m^4.0.0[22m" from [1mmui-datatables[22m@[1m3.7.6[22m[2m[22m 49 error [2mnode_modules/mui-datatables[22m 49 error [1mmui-datatables[22m@"[1m[22m" from the root project 49 error 1 more (@material-ui/icons) 49 error 2 more (react-dom, @material-ui/icons) 49 error 49 error Could not resolve dependency: 49 error [35mpeer[39m [1mreact[22m@"[1m^16.8.0[22m" from [1mmui-datatables[22m@[1m3.7.6[22m[2m[22m 49 error [2mnode_modules/mui-datatables[22m 49 error [1mmui-datatables[22m@"[1m*[22m" from the root project 49 error 49 error Fix the upstream dependency conflict, or retry 49 error this command with --force, or --legacy-peer-deps 49 error to accept an incorrect (and potentially broken) dependency resolution. 49 error 49 50 verbose exit 1

wdh2100 commented 3 years ago

Please fill this

Tech Version
Material-UI
MUI-datatables

React

roger-appleby commented 3 years ago

Material UI - 4.11.3 React 17.0.1 mui-datatables 4.11.1

wdh2100 commented 3 years ago

1660

iLvrge commented 3 years ago

getting same error

npm ERR! Found: react@17.0.1 npm ERR! node_modules/react npm ERR! react@"^17.0.1" from the root project npm ERR! peer react@"^16.8.0 || ^17.0.0" from @material-ui/core@4.11.3 npm ERR! node_modules/@material-ui/core npm ERR! @material-ui/core@"^4.11.3" from the root project npm ERR! peer @material-ui/core@"^4.0.0" from mui-datatables@3.7.6 npm ERR! node_modules/mui-datatables npm ERR! mui-datatables@"" from the root project npm ERR! 1 more (@material-ui/icons) npm ERR! 2 more (react-dom, @material-ui/icons) npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react@"^16.8.0" from mui-datatables@3.7.6 npm ERR! node_modules/mui-datatables npm ERR! mui-datatables@"" 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.

bienenstich commented 3 years ago

Any news on this issue yet?

SreevaniPatil commented 3 years ago

Update peer dependecies using the below command: npm i package-name --legacy-peer-deps

OR

Install Recommended version of nodejs

fdw commented 3 years ago

Install Recommended version of nodejs

What does node.js have to do with this?

It seems to me that mui-datatables depends on react-sortable-tree, which has problems with React 17 (and also looks a bit unmaintained, judging from the unmerged "[security]" PRs). Or am I missing something?

mouhanad-alaskari commented 3 years ago

Install Recommended version of node.js

Installing the latest stable version of node.js, solved the problem for me.

dariusj18 commented 3 years ago

I see the error when I use npm version 7.16.0 and nodejs version 14.17.1

nosferatu500 commented 3 years ago

Hi @wdh2100 ! I made fork of this library and fix issue with React 17

yarn add @nosferatu500/react-sortable-tree

https://github.com/nosferatu500/react-sortable-tree

I don't have time for my own PR for this repo, but I think it will be enough just replace original react-sortable-tree in package.json