Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

Using npm 7 Peer Dependencies With Gatsby Cloud

If you are using npm 7, you may encounter conflicting peer dependencies that cause a build failure.

Adding the environment variable NPM_CONFIG_LEGACY_PEER_DEPS=true will force the legacy behavior and use the peer dependency behavior of npm versions 3 - 6. Be aware that, per the npm docs, use of legacy-peer-deps is not recommended, as it will not enforce the peerDependencies contract that meta-dependencies may rely on.

Start building today on Netlify!
Edit this page on GitHub
© 2023 Gatsby, Inc.