Document how pruning works within Next.js build process
Type: New ContentTopic: Next.js
We recently saw errors in our Next.js starter that were caused by npm/Next attempting to re-download a dependency that had been pruned.
https://github.com/pantheon-upstreams/nextjs/pull/4/changes
In this case the `typescript` dependency should have in `dependencies` not `devDependencies` all along. When in `devDependencies` TypeScript was getting pruned and then re-downloaded when needed. We noticed a problem when the re-downloading started failing.
It is worth documenting when/where/why the build process runs https://docs.npmjs.com/cli/v8/commands/npm-prune
0 条评论