Parcel "@parcel/resolver-default: Cannot find module" in CI
Parcel's default resolver tried to locate an import and failed. The package is not installed, the relative path is wrong, or the case does not match the file on the case-sensitive runner filesystem.
What this error means
The build fails with "@parcel/resolver-default: Cannot find module 'X'" or "Failed to resolve 'X' from './src/...'" and a code frame on the import.
@parcel/core: Failed to resolve './utils/format' from './src/index.js'
@parcel/resolver-default: Cannot find module './utils/format'Common causes
A dependency missing in the CI install
The package was never installed in CI, or a devDependency import was dropped by a production-only install.
A wrong path or case mismatch
The relative path does not exist, or its case differs from the real file name on a case-sensitive runner.
How to fix it
Install the dependency or fix the path
- Confirm the package or file exists with the exact name and case.
- Install missing packages or correct the import path.
- Re-run the Parcel build to confirm resolution.
npm ci
npx parcel build src/index.htmlClear the Parcel cache if it is stale
A stale .parcel-cache can keep referencing a moved module; clearing it forces a clean resolve.
rm -rf .parcel-cache
npx parcel build src/index.htmlHow to prevent it
- Commit a lockfile so CI installs every imported package.
- Match import paths to real file names and case.
- Avoid caching
.parcel-cacheacross incompatible changes.