-
Notifications
You must be signed in to change notification settings - Fork 76
troubleshoot build errors
Most of the build errors we see stem from npm dependency conflicts.
Cannot find module '@nx/nx-<platform'
This error is due to a missing native module for nx
, which is used by Lerna
for releasing our monorepo packages. It is a common problem related to
npm/cli #4828, and nx
has documented
some troubleshooting steps.
The requested module 'globby' does not provide an export named 'default'
This error is related to some of our dependencies using different major
versions of globby
. Our package-lock.json
ensures the right globby
version is used in the right place. Recently, deleting the package-lock.json
messes up the dependency tree and causes errors. I've been fixing this error by
resetting package-lock.json
to a working version. For example, checkout the
file from the latest release, then install to update the package versions
without breaking the dependency tree.
git checkout $(git for-each-ref refs/tags --count=1 --sort=-taggerdate --format='%(refname:short)') -- package-lock.json
npm install