Based on this issue that i created #5231
Turns out the issue wasn't on vercel. it's pnpm that didn't consistent when installing dependencies.
We can reproduce it with this repo.
note: I have set up auto-install-peers=true in .npmrc
Steps to reproduce.
- git clone https://github.com/bryantobing12/next-boilerplate
- cd
next-boilerplate
pnpm install
pnpm lint,
- the error shows up that tells
Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json » eslint-config-airbnb-typescript » C:\Users\bryan\myfiles\sandbox\hzn-workspace\next-boilerplate\node_modules\.pnpm\eslint-config-airbnb-typescript@17.0.0_xo3iu7jah6intte3rsuo37bj74\node_modules\eslint-config-airbnb-typescript\lib\shared.js': Cannot find module '@typescript-eslint/eslint-plugin'
- at this point if we inspect node_modules. it's indeed
@typescript-eslint/eslint-plugin not installed.

and it makes sense the errors show up because it is not added to node_modules where it is supposed to be added since it's listed as peerDependencies in eslint-config-airbnb-typescript package
.
- next,
rm -rf pnpm-lock.yaml && pnpm install
pnpm lint the error didn't show up.
- and if we inspect
node_modules
@typescript-eslint/eslint-plugin finally added there

why is this behavior happen? I don't want to always remove pnpm-lock.yaml before installing dependencies and It will create inconsistencies throughout the team
Originally posted by @bryantobing12 in #5231 (comment)
Additional Context
OS: Windows 11
Based on this issue that i created #5231
Turns out the issue wasn't on vercel. it's pnpm that didn't consistent when installing dependencies.
We can reproduce it with this repo.
note: I have set up
auto-install-peers=truein.npmrcSteps to reproduce.
next-boilerplatepnpm installpnpm lint,Failed to load plugin '@typescript-eslint' declared in '.eslintrc.json » eslint-config-airbnb-typescript » C:\Users\bryan\myfiles\sandbox\hzn-workspace\next-boilerplate\node_modules\.pnpm\eslint-config-airbnb-typescript@17.0.0_xo3iu7jah6intte3rsuo37bj74\node_modules\eslint-config-airbnb-typescript\lib\shared.js': Cannot find module '@typescript-eslint/eslint-plugin'@typescript-eslint/eslint-pluginnot installed.and it makes sense the errors show up because it is not added to
node_moduleswhere it is supposed to be added since it's listed aspeerDependenciesineslint-config-airbnb-typescriptpackagerm -rf pnpm-lock.yaml && pnpm installpnpm lintthe error didn't show up.node_modules@typescript-eslint/eslint-pluginfinally added therewhy is this behavior happen? I don't want to always remove
pnpm-lock.yamlbefore installing dependencies and It will create inconsistencies throughout the teamOriginally posted by @bryantobing12 in #5231 (comment)
Additional Context
OS: Windows 11