failed to load config from ...\vite.config.ts
error during build:
Error: vite-plugin-graphql-codegen tried to access @graphql-codegen/plugin-helpers, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Given the usage of this package in src/utils/configPaths.ts, Yarn PnP requires adding the dependency explicitly.
Solution: @graphql-codegen/plugin-helpers should be added either as dependency or peerDependency to package.json.
When running a Vite build with Yarn PnP mode enabled (see https://v3.yarnpkg.com/features/pnp), I ran into the following error:
Given the usage of this package in
src/utils/configPaths.ts
, Yarn PnP requires adding the dependency explicitly.Solution:
@graphql-codegen/plugin-helpers
should be added either asdependency
orpeerDependency
topackage.json
.