pnpm deploy logs show ENOENT errors when linking production dependencies
0 reputation · 09 Jan 2021, 20:39 UTC
Symptom
When running pnpm deploy to prepare a production copy, the deployment logs contain ENOENT or missing file warnings during the linking phase.
Goal
Determine whether the missing file errors originate from a corrupted local store, from the default shamefully-hoist setting, or from another step in the deploy process.
Constraints and uncertainty
The deploy command creates a virtual store and links only production dependencies; verbose logging (--loglevel verbose) shows each linking step, but it is unclear if the errors appear before or after script execution. Store integrity can be checked with pnpm store status, yet concurrent store modifications may cause false positives. The unresolved decision around shamefully-hoist influences how hoisted packages appear in node_modules and may masquerade as missing files.
Questions
- Does the
ENOENTmessage appear in the log output for the "Linking package" step or later during "Running prepare script"? - How can
pnpm store statusbe interpreted to confirm store integrity before a deployment? - If shamefully-hoist is enabled via
.npmrc, do the missing file warnings disappear in the deploy logs?