hinode icon indicating copy to clipboard operation
hinode copied to clipboard

npm dependencies conflict in template

Open epogrebnyak opened this issue 1 year ago • 8 comments
trafficstars

Describe the bug

In https://github.com/gethinode/template npm install results in

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/eslint-plugin-n
npm ERR!   dev eslint-plugin-n@"^17.3.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-n@"^15.0.0 || ^16.0.0 " from [email protected]
npm ERR! node_modules/eslint-config-standard
npm ERR!   dev eslint-config-standard@"^17.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/eslint-plugin-n
npm ERR!   peer eslint-plugin-n@"^15.0.0 || ^16.0.0 " from [email protected]
npm ERR!   node_modules/eslint-config-standard
npm ERR!     dev eslint-config-standard@"^17.1.0" from the root project

epogrebnyak avatar Apr 28 '24 18:04 epogrebnyak

Thanks for reporting the issue, however, I cannot reproduce it. When submitting a bug in the future, would you mind filling in the template? It includes a section on how to reproduce the error and it clarifies the host environment.

Regarding the submitted error logs, the eslint-config-standard package is not compatible with the latest eslint-plugin-n yet. See https://github.com/standard/eslint-config-standard/issues/410 for the latest status. For now, the Hinode (template) repository uses eslint-plugin-n v16.6.2 instead (see PR https://github.com/gethinode/template/pull/311 for an automated test).

I suspect you upgraded the npm modules locally (e.g. npx npm-check-updates) and ran into this issue when running npm install? My advice would be to use the current package.json file as is.

markdumay avatar Apr 29 '24 03:04 markdumay

Thank you for prompt response. There where not many steps involved rather than following the tutorial to create the repo from template and run npm install. I did not change package.json (I think). I could get past the issue with npm install --force. I can try repoduce the error once more and report it back here.

epogrebnyak avatar Apr 29 '24 09:04 epogrebnyak

I got the same issue on debian 12. is there any way to handle it in a clean way, without using --force?

ammakr avatar May 10 '24 07:05 ammakr

I found the solution, just change one of the dep version: "eslint-plugin-n": "^16.0.0",

ammakr avatar May 10 '24 07:05 ammakr

Thanks! At package.json is that?

epogrebnyak avatar May 10 '24 14:05 epogrebnyak

@epogrebnyak, which host OS are you using? I cannot reproduce the error on macOS or Ubuntu (via GitHub codespaces), so perhaps it's tied to a specific host environment. I'm fine to adjust the base repositories, however, I'd like to understand the cause of the issue a bit better.

markdumay avatar May 12 '24 08:05 markdumay

Should have said i'm on Windows

epogrebnyak avatar May 12 '24 08:05 epogrebnyak

Thanks! At package.json is that?

Yep, and it is not some OS related problem, i happen to come across this on debian 12.

ammakr avatar May 12 '24 10:05 ammakr

The issue should be solved now (see v0.14.0 for details). PR https://github.com/gethinode/template/pull/311 tracks the progress of eslint-plugin-n.

markdumay avatar Jun 04 '24 04:06 markdumay