cube icon indicating copy to clipboard operation
cube copied to clipboard

Package cannot install on node > v14 with npm but works for yarn

Open josx opened this issue 1 year ago • 4 comments

Describe the bug With node 16.x you get errors on install.

To Reproduce

  1. git clone repo
  2. npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @cubejs-client/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^7.21.0" from @cubejs-client/[email protected]
npm ERR!   packages/cubejs-client-core
npm ERR!     @cubejs-client/[email protected]
npm ERR!     node_modules/@cubejs-client/core
npm ERR!       workspace packages/cubejs-client-core from the root project
npm ERR!       7 more (@cubejs-backend/testing, @cubejs-client/ngx, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.19.1 || ^5.3.0" from [email protected]
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR!   dev eslint-config-airbnb-base@"^13.1.0" from @cubejs-client/[email protected]
npm ERR!   packages/cubejs-client-core
npm ERR!     @cubejs-client/[email protected]
npm ERR!     node_modules/@cubejs-client/core
npm ERR!       workspace packages/cubejs-client-core from the root project
npm ERR!       7 more (@cubejs-backend/testing, @cubejs-client/ngx, ...)
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/josx/.npm/eresolve-report.txt for a full report.

Expected behavior Clear installation without errors.

Version: master branch

*Fix nvm use 14

josx avatar Aug 18 '22 17:08 josx

Hello!

Hmm, interesting to see that yarn allows to install it. I approve, that right now; it's impossible to use npm.

image

Potentially, it can cause problems.

I recommend you to use yarn for now before we will align our dependencies to the correct versions.

Thanks

ovr avatar Aug 18 '22 21:08 ovr

You can use npm with node 14.x or pnpm

josx avatar Aug 19 '22 01:08 josx

By default, yarn should be used to build Cube. Please feel free to provide PR with a fix if you find out how to fix it for npm.

paveltiunov avatar Sep 04 '22 19:09 paveltiunov

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you. If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines. You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

github-actions[bot] avatar Sep 04 '22 19:09 github-actions[bot]

To avoid the errors using npm you can run npm install --legacy-peer-deps on node > 14

So Maybe it is usefull to add it in CONTRBUTION

@paveltiunov If you agree i can do it.

josx avatar Sep 23 '22 13:09 josx