You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.
The problem is for the nested load of deeper, resolve() is using deeper/package.json:main and real Node.js doesn't instead using deeper/index.js directly, which we see in output here:
$ node out/pkgs/index.js
internal/modules/cjs/loader.js:305
throw err;
^
Error: Cannot find module '/Users/rye/Desktop/TD_TEST/out/pkgs/dep/deeper'. Please verify that the package.json has a valid "main" entry
at tryPackage (internal/modules/cjs/loader.js:297:19)
at Function.Module._findPath (internal/modules/cjs/loader.js:528:18)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:780:27)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/rye/Desktop/TD_TEST/out/pkgs/index.js:1:13)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32) {
code: 'MODULE_NOT_FOUND',
path: '/Users/rye/Desktop/TD_TEST/out/pkgs/dep/package.json',
requestPath: './dep'
}
The text was updated successfully, but these errors were encountered:
For a contrived example like:
Node.js resolves thusly:
$ node pkgs TODO HERE { dep: 'deeper index' }
which means
pkgs/dep/package.json
is read, butpkgs/dep/deeper/package.json
is not, instead just usingpkgs/dep/deeper/index.js
.In
trace-deps
, theresolve
library instead comes up with our traced deps as:The problem is for the nested load of
deeper
,resolve()
is usingdeeper/package.json:main
and real Node.js doesn't instead usingdeeper/index.js
directly, which we see in output here:The text was updated successfully, but these errors were encountered: