christopher-caldwell / react-kanban

react-kanban
MIT License
18 stars 10 forks source link

Fix npm install #42

Closed vjanssens closed 2 days ago

vjanssens commented 3 weeks ago

This fixes npm install command failing on main branch, which I also noticed on other PRs currently open. Hopefully this allows to get the other PRs being merged as well to get tests working and continue improvement of the repo.

npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: @caldwell619/react-kanban@0.0.8
npm error Found: eslint@8.57.1
npm error node_modules/eslint
npm error   dev eslint@"^8.24.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint@"2.x - 6.x" from eslint-plugin-import@2.20.2
npm error node_modules/eslint-plugin-import
npm error   dev eslint-plugin-import@"2.20.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
christopher-caldwell commented 3 weeks ago

I use yarn, and it works as is. Interestingly, the lock files were previously in the gitignore. I didn't realize this when I ported the library.

To be transparent, I am hesitant to do a PR for npm when I use yarn successfully. Curious to see what others think. I of course have a lock file on my machine which is now part of the source, as I removed them from the gitignore.

Sabrinovsky commented 3 days ago

Normally the project should stick to only one. Since this project already has a yarn.lock, the install should be with yarn. I don’t know if theres another reason for using npm install, otherwise i dont think it is necessary.

Anyway, thanks for the PR.

NathanC commented 3 days ago

npm and yarn are mostly interchangeable these days, but agreed you should normally stick with one. I tend to use yarn now as it has some useful performance optimizations and somewhat better support for monorepos.