ag-grid-react-example icon indicating copy to clipboard operation
ag-grid-react-example copied to clipboard

unable to resolve dependency tree

Open audetto opened this issue 3 years ago • 6 comments

On a fresh clone using

npm 8.19.3 node v18.13.0

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"18.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.3 || ^17" from [email protected]
npm ERR! node_modules/react-redux
npm ERR!   react-redux@"7.2.6" 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.

audetto avatar Jan 18 '23 10:01 audetto

Please try with 'yarn install'

semihozbir1 avatar May 02 '23 17:05 semihozbir1

Please try with 'yarn install'

That worked for me, perhaps the README should be updated if yarn should be used.

curiousercreative avatar May 03 '23 18:05 curiousercreative

Perhaps related, I also receive errors when trying to run the examples (Pop!_OS 22.04).

npm run examples

> [email protected] examples
> webpack-dev-server --content-base src-examples/ --config config/webpack.config.examples.js --mode development --open

ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/curiouser/Sites/tmp/src-examples
ℹ 「wds」: 404s will fallback to /index.html
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/curiouser/Sites/tmp/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/curiouser/Sites/tmp/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/curiouser/Sites/tmp/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/curiouser/Sites/tmp/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/curiouser/Sites/tmp/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/curiouser/Sites/tmp/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/curiouser/Sites/tmp/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/home/curiouser/Sites/tmp/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.16.0

I'm using nvm, so the simple workaround is to simple nvm use 16 to run the examples:

nvm use 16

npm run examples

curiousercreative avatar May 03 '23 18:05 curiousercreative

Please try with 'yarn run examples' 😊

semihozbir1 avatar May 03 '23 18:05 semihozbir1

Please try with 'yarn run examples' blush

Not quite as simple this time :p

curiousercreative avatar May 03 '23 18:05 curiousercreative

I am running in PowerShell. Does it matter? yarn run examples first errors with 'NODE_OPTIONS' is not recognized as an internal or external command, operable program or batch file. so I removed NODE_OPTIONS=--openssl-legacy-provider but then it errors with``` 'webpack-dev-server' is not recognized as an internal or external command, operable program or batch file.

Ofer-Gal avatar Nov 25 '23 10:11 Ofer-Gal