Closed brucejo75 closed 3 years ago
I think #30 would resolve this.
@copleykj, Thanks for the quick response!
Yeah, unfortunately there isn't much to do but document because of the way the build system works.
In all reality, this package was a bandaid and honestly this functionality deserves first class support within the build system and this package retired.
This had me confused for quite a while today...
Repro
I am using
nanoid@2.0.1
.In my package I
Result
Error message output:
Discussion
I believe that
modules-runtime
scans all the code looking for allimport
/require
statements. Then if fills out a file tree structure based on those scans.If you only reference a subfolder in an
import
orrequire
, e.g.modules-runtime
would be unaware of anything innode_modules/packageName
it would only be aware of what is innode_modules/packageName/subfolder
. So it cannot findnode_modules/packageName/package.json
.Workaround
essentially you can whitelist
package.json
forcheckNpmVersions
just like dynamic import whitelisting:FIX?
Not sure how this could be fixed in this case? Maybe this should be documented?