SnowdogApps / magento2-frontools

Set of front-end tools for Magento 2 based on Gulp.js
MIT License
430 stars 142 forks source link

Unable to install since `npm` version 8.6.0 #453

Open fredden opened 2 years ago

fredden commented 2 years ago

We've recently upgraded our 'node' docker image which brought an upgrade of npm (from version 8.1.2 to version 8.11.0). From what I can tell, there is a change that was introduced in npm version 8.6.0 which is not compatible with this module.

I've checked that I'm on the latest version of this package (tested with both version 1.12.0 and 1.12.2)

Steps to reproduce

  1. Clone this repository (tested with 2a5854781c970044af38aabdce2efa1a6bf9e56e, which is tagged version 1.12.2)
  2. Run docker run --rm -it -v $PWD:/app -w /app node:16 npm install

Expected result

Task completes successfully.

Actual result

Screenshot_2022-07-05_12-35-50

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: eslint-plugin-compat@3.13.0
npm ERR! Found: eslint@8.1.0
npm ERR! node_modules/eslint
npm ERR!   eslint@"^8.1.0" from the root project
npm ERR!   peer eslint@">=5" from eslint-utils@3.0.0
npm ERR!   node_modules/eslint-utils
npm ERR!     eslint-utils@"^3.0.0" from eslint@8.1.0
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" from eslint-plugin-compat@3.13.0
npm ERR! node_modules/eslint-plugin-compat
npm ERR!   eslint-plugin-compat@"^3.13.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: eslint@7.32.0
npm ERR! node_modules/eslint
npm ERR!   peer eslint@"^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" from eslint-plugin-compat@3.13.0
npm ERR!   node_modules/eslint-plugin-compat
npm ERR!     eslint-plugin-compat@"^3.13.0" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-07-05T11_35_35_317Z-debug-0.log

At time of writing the 'node:16' image has npm version 8.11.0. When testing with version 8.5.5 this works, and from 8.6.0 this error shows. Works: docker run --rm -it -v $PWD:/app -w /app node:16 bash -c 'npm install -g npm@8.5.5 && npm install' Error as above: docker run --rm -it -v $PWD:/app -w /app node:16 bash -c 'npm install -g npm@8.6.0 && npm install'

linshin commented 1 year ago

We have the same problem, any updates?

davidwindell commented 1 year ago

We were able to work around this with npm install --legacy-peer-deps