inspectpack: [BUG] Application roots without node_modules on disk are missed for versions inference.
In a Next JS app with a custom webpack config, inpectpack prints the following after build, without the information about the actual bundles:
It is a Next v8.0.1 app, running on node v10.8.0 and Webpack 4.29.0.
Relevant part of next.config.js
is:
{
// ...
webpack: (config, opts) =>{
// ...
// Check for duplicate code from dependencies
if (!isServer) {
config.plugins.push(
new DuplicatesPlugin({ verbose: true, })
);
}
return config
},
}
Any insight would be appreciated
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 36 (22 by maintainers)
Cool! For verbose, I think I just was confused by the manual editing of the report output (and I’ve got a ticket #109 to collapse large amounts of dependency graphs for easier reading in the future). Here’s what I see and I’m guessing that matches up with you:
OK, now updated… I think I’ve got everything correctly matched up with what the simple duplicates report has.
side note: It is fascinating to see what all the
fela
-monorepo released stuff ends up with dependency-wise, but looks like modulo a few duplicates, the lerna package release keeps things pinned so we have a ton of logical dependencies from the abstract dependency tree, but only a handful of actual on-disk installations…Hi folks, just wanted to post an update – I’ve made good progress with regression tests and supporting unit tests to isolate the issue and head us towards a solution that still keeps the versions inference blazing fast (the technical challenging is limiting / optimizing the disk i/o to read
node_modules
so that it doesn’t make for awful performance).WIP work is still at: https://github.com/FormidableLabs/inspectpack/pull/104
I expect I’ll be able to ship a fix this week. Thanks!
Hey there, we are also experiencing this bug. It happens in our projects within yarn workspace with dependencies installed to a folder higher up (e.g.
../../node_modules
). It works correctly when I move project out of yarn workspace and install dependencies normally (to./node_modules
). You’ve already figured this out so this is kinda useless, just wanted add more data. Also, I want to thank you for how fast you are responding to this issue.