Hello friends, i think i've found an issue with `e...
# help
j
Hello friends, i think i've found an issue with
eslint-config-serverless-stack
while upgrading sst from
0.60.4
to
0.69.3
. 🐛 There seems to be a dependency mismatch in
eslint-config-serverless-stack
. Basically, specified versions for
@typescript-eslint/eslint-plugin
and
@typescript-eslint/parser
specify a different
eslint
peer dependency. Take a look at the error when I try to install inside
eslint-config-serverless-stack
:
Copy code
user@DESKTOP-FEN9EV4 ~/Documents/serverless-stack/packages/eslint-config-serverless-stack (master)
λ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: eslint-config-serverless-stack@0.69.3
npm ERR! Found: eslint@8.12.0
npm ERR! node_modules/eslint
npm ERR!   eslint@"^8.10.0" from the root project
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/eslint-plugin@5.17.0
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     @typescript-eslint/eslint-plugin@"^5.12.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/parser@4.33.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   @typescript-eslint/parser@"^4.15.1" 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 C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Local\npm-cache\_logs\2022-03-31T14_12_11_758Z-debug.log
I get the same error when I try to install stuff in my own project after upgrading sst versions. Im not the wisest guy when it comes to npm, but it just looks like the parser's version should be updated to match eslint-plugin's. Let me know what you think 🤔
t
ugh we really need to remove our built in eslint
been really hard to get it working with every possible setup
I'd suggest not using our eslint package and setting it up using a standard setup
d
Amongst 50+ SST projects, I have yet to have one not throw an ESLint peer dependency error (and I dont use the config, its the CLI).
j
Hmm, but
eslint-config-serverless-stack
is a dependency of
core
. I cannot exclude transitive dependencies, can I?
d
No, you cannot.
j
so im not sure what you meant @thdxr by not using your eslint pkg 🤔
d
I have spent several hours on this issue, since it was previously much more serious (clashes on other packages that were production-side), and have yet to find a solution that works in all cases. I have just been eating the ESLint-related errors and quietly hoping the SST guys decide to “Do Less.” (again)
But your point about matching versions on TS-Eslint makes sense, its just a symptom of a bigger issue, IMO, and I used you as a megaphone since @thdxr seems on board today. 😅
t
@Derek Kershner haha I've been on board for a while - we're definitely going to do it after our next big release
d
Sounds good to me!
t
@Jacoby hm I'm not sure how to resolve your existing issue
do you mind waiting a few weeks for us to rip this out?
actually here let me try bumping the dep
@Jacoby can you try
sst update 0.70.0-next.26
to see if that fixes your issue
j
hmm, weird, im getting the same error for `0.70.0-next.26`:
Copy code
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: eslint@8.12.0
npm ERR! node_modules/eslint-config-serverless-stack/node_modules/eslint
npm ERR!   eslint@"^8.10.0" from eslint-config-serverless-stack@0.70.0-next.26
npm ERR!   node_modules/eslint-config-serverless-stack
npm ERR!     eslint-config-serverless-stack@"0.70.0-next.26+41858439" from @serverless-stack/core@0.70.0-next.26
npm ERR!     node_modules/@serverless-stack/core
npm ERR!       @serverless-stack/core@"0.70.0-next.26+41858439" from @serverless-stack/cli@0.70.0-next.26
npm ERR!       node_modules/@serverless-stack/cli
npm ERR!         @serverless-stack/cli@"0.70.0-next.26" from the root project
npm ERR!       1 more (@serverless-stack/resources)
npm ERR!   peer eslint@"^6.0.0 || ^7.0.0 || ^8.0.0" from @typescript-eslint/eslint-plugin@5.17.0
npm ERR!   node_modules/eslint-config-serverless-stack/node_modules/@typescript-eslint/eslint-plugin
npm ERR!     @typescript-eslint/eslint-plugin@"^5.12.1" from eslint-config-serverless-stack@0.70.0-next.26
npm ERR!     node_modules/eslint-config-serverless-stack
npm ERR!       eslint-config-serverless-stack@"0.70.0-next.26+41858439" from @serverless-stack/core@0.70.0-next.26
npm ERR!       node_modules/@serverless-stack/core
npm ERR!         @serverless-stack/core@"0.70.0-next.26+41858439" from @serverless-stack/cli@0.70.0-next.26
npm ERR!         node_modules/@serverless-stack/cli
npm ERR!         1 more (@serverless-stack/resources)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.0.0 || ^6.0.0 || ^7.0.0" from @typescript-eslint/parser@4.33.0
npm ERR! node_modules/eslint-config-serverless-stack/node_modules/@typescript-eslint/parser
npm ERR!   @typescript-eslint/parser@"^4.15.1" from eslint-config-serverless-stack@0.70.0-next.26
npm ERR!   node_modules/eslint-config-serverless-stack
npm ERR!     eslint-config-serverless-stack@"0.70.0-next.26+41858439" from @serverless-stack/core@0.70.0-next.26
npm ERR!     node_modules/@serverless-stack/core
npm ERR!       @serverless-stack/core@"0.70.0-next.26+41858439" from @serverless-stack/cli@0.70.0-next.26
npm ERR!       node_modules/@serverless-stack/cli
npm ERR!       1 more (@serverless-stack/resources)
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.
as if the version hasnt been bumped
hmm, btw, im not using sst's linting, i have it disabled in
sst.json
. I've tried upgrading my own project's eslint deps, alongside upgrading sst to
0.69.3
. I tried
npm install
and the peer dependency issue is no longer occurring. Thats kinda weird, right? I mean, the sst's
eslint-config-serverless-stack
still has its eslint dependencies messed up, yet it works fine now 🤔 after ive upgraded my project's deps (
eslint
to
8.12.0
and
eslint-plugin/parser
to
5.17.0
) 🤷‍♂️
this eslint ecosystem is crazy, dependencies upon dependencies upon plugins upon peer dependencies... ... ..
Although me being dumb may be the main reason for it being so diffucult 🤞
t
it was me being dumb the package failed to publish and I didn't notice
try 0.70.0-next.29
f
hey @Jacoby, just checking in if
0.70.0-next.29
worked for you?
j
Apologies for not responding. I will try to test it today. 🤞