Callstack error on version 32.1.x or newer
faran-tenovos opened this issue · 12 comments
On putout version 32.1.x or 32.2.0 I get the following error
eslint --cache --cache-location .next/cache/eslint/ --fix:
Oops! Something went wrong! :(
ESLint: 8.50.0
RangeError: Maximum call stack size exceeded
at NodePath.isBlockScoped (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:41952:23)
at Object.newFn (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:37691:30)
at NodePath._call (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:40821:20)
at NodePath.call (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:40808:14)
at NodePath.visit (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:40855:31)
at TraversalContext.visitQueue (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:42250:16)
at TraversalContext.visitSingle (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:42229:19)
at TraversalContext.visit (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:42273:19)
at traverseNode (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:42291:17)
at NodePath.visit (/some-user/node_modules/.pnpm/@putout+babel@1.1.1/node_modules/@putout/babel/bundle/babel.cjs:40861:21)
husky - pre-commit hook exited with code 1 (error)
While this works fine on version 32.0.7
Could you show me js file you trying to lint
It is a full project on which I'm running it. I'm using eslint-plugin-putout
What version? Can you reproduce this with one file? Have you modified configs?
Looks like you have old version of @putout/babel
consider upgrade, and try to use npm or yarn to install dependencies
I'm not using @putout/babel
It is dependency used by 🐊Putout, in your stack trace: pnpm/@putout+babel@1.1.1
, but that is not the latest version, should be 1.2.2
, maybe problem with pnpm
?
Tried removing pnpm cache using pnpm store prune
deleted node_modules, pnpm-lock file too but still getting the stack trace error on the latest version
Try to install with npm, check version of installed @putout/babel
, what version do you have?
It works with npm, something is wrong pnpm. Thanks
Sometimes package managers messing with dependencies, I have a similar problem with Bun https://github.com/coderaiser/putout/actions/runs/6347747012/job/17243207041 (only in this repo), it somehow installs ESLint in the wrong way 🤷
@coderaiser any fix on this issue I've switched from pnpm to bun and the same issue and I can see that you too are having this issue I think it has something to do with how they build symlinks instead of actually cloning as npm does. But srangely enough it works with versions 32.0.7
or lower. With pnpm or bun both
The thing is everything works good with not: yarn and npm, so I have no idea what is the problem with bun and pnpm, anyways I created issue about it oven-sh/bun#4473