Skip to content

Vercel doesn't automatically install peerDependencies, auto-install-peers=true in .npmrc #5231

@bryanprimus

Description

@bryanprimus

pnpm version:

Code to reproduce the issue:

https://github.com/bryantobing12/next-boilerplate

Steps to reproduce

  • pnpm install, it will install @typescript-eslint/eslint-plugin in local. because it's listed as eslint-config-airbnb-typescript peers,
  • pnpm build success in local that require @typescript-eslint/eslint-plugin
  • deploy to vercel, pnpm build error because it can't find @typescript/eslint-plugin

in this repo, I have set in .npmrc file auto-install-peers=true

It works in my local developement and the peerDepedencies installed,

but when deploying to vercel, in the build process, the error appears because some peerDependencies cannot be found, in my case is @typescript/eslint-plugin that being used in eslint-config-airbnb-typescript

and i think it's because vercel doesn't detect .npmrc file and set the option to automatically install dependencies

Expected behavior:

Vercel read options set in .npmrc file, which in this case auto-install-peers=true so that It installing all required peerDependencies

Actual behavior:

Build error, because it missing some peerDependencies

Additional information:

  • node -v prints: v16.13.2
  • Windows, macOS, or Linux?: WINDOWS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions