coderaiser / putout

🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
https://putout.cloudcmd.io/
MIT License
698 stars 40 forks source link

`npm install` broken due to eslint shenanigans #217

Closed MatthewScholefield closed 1 month ago

MatthewScholefield commented 1 month ago

FYI I'm in the process of setting up the repo (going to try fixing #213), but it looks like the eslint 9 situation is causing some problems (since eslint-plugin-import doesn't support eslint 9 yet):

$ npm run bootstrap  

> bootstrap
> madrun bootstrap

> npm install
npm error code ERESOLVE
npm error Invalid string length

npm error A complete log of this run can be found in: /home/matthew/.npm/_logs/2024-07-16T07_29_30_075Z-debug-0.log
Command failed: npm install

And similarly:

$ npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: root@undefined
npm error Found: eslint@9.7.0
npm error node_modules/eslint
npm error   dev eslint@"^9.0.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer eslint@"^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" from eslint-plugin-import@2.29.1
npm error node_modules/eslint-plugin-import
npm error   dev eslint-plugin-import@"^2.25.3" 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.
npm error
npm error
npm error For a full report see:
npm error /home/matthew/.npm/_logs/2024-07-16T07_17_58_718Z-eresolve-report.txt

npm error A complete log of this run can be found in: /home/matthew/.npm/_logs/2024-07-16T07_17_58_718Z-debug-0.log

Solution is to edit .madrun.mjs to use npm install --force instead of npm install and similarly initially use npm install --force for project setup.

Also, not directly related, I personally am not familiar with JS development so this might be obvious, but it might be useful to mention (within CONTRIBUTING.md) that you can do node packages/putout/bin/putout.mjs to manually run the CLI entrpoint for interactive development.

Cheers!

coderaiser commented 1 month ago

You can install with bun it installs much faster