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
esmIssues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.policyIssues and PRs related to the policy subsystem.
$ NODE_DEBUG=policy,esm,module node --experimental-policy ./policy.json -- src/node-main.jsPOLICY 58628: Manifest contains integrity for resource ./src/node-main.jsPOLICY 58628: Manifest contains integrity for resource ./src/write-answer/write-answer.jsPOLICY 58628: Manifest contains integrity for scope file:POLICY 58628: Checking integrity of file:///Users/bfarias/Documents/oss/import-map-to-policy/package.json(node:58628) ExperimentalWarning: Policies are experimental.(Use `node --trace-warnings ...` to show where the warning was created)ESM 58628: Storing file:///Users/bfarias/Documents/oss/import-map-to-policy/src/node-main.js in ModuleMapPOLICY 58628: Checking integrity of file:///Users/bfarias/Documents/oss/import-map-to-policy/src/node-main.jsESM 58628: Translating StandardModule file:///Users/bfarias/Documents/oss/import-map-to-policy/src/node-main.jsESM 58628: Storing file:///Users/bfarias/Documents/oss/import-map-to-policy/src/write-answer/write-answer.js in ModuleMapPOLICY 58628: Checking integrity of file:///Users/bfarias/Documents/oss/import-map-to-policy/src/write-answer/write-answer.jsESM 58628: Translating StandardModule file:///Users/bfarias/Documents/oss/import-map-to-policy/src/write-answer/write-answer.jsESM 58628: Storing file:///Users/bfarias/Documents/oss/import-map-to-policy/src/answer/answer.js in ModuleMapPOLICY 58628: Checking integrity of file:///Users/bfarias/Documents/oss/import-map-to-policy/src/answer/answer.jsESM 58628: Translating StandardModule file:///Users/bfarias/Documents/oss/import-map-to-policy/src/answer/answer.jsnode:internal/process/esm_loader:74Error [ERR_MANIFEST_DEPENDENCY_MISSING]: Manifest resource file:///Users/bfarias/Documents/oss/import-map-to-policy/src/node-main.js:1 does not list write-answer as a dependency specifier for conditions: node, import at new NodeError (node:internal/errors:329:5) at Loader.defaultResolve [as _resolve] (node:internal/modules/esm/resolve:821:18) at Loader.resolve (node:internal/modules/esm/loader:86:40) at ModuleJob._instantiate (node:internal/modules/esm/module_job:117:31) at async ModuleJob.run (node:internal/modules/esm/module_job:151:5) at async Loader.import (node:internal/modules/esm/loader:166:24) at async Object.loadESM (node:internal/process/esm_loader:68:5) { code: 'ERR_MANIFEST_DEPENDENCY_MISSING'}
You can note the :1 that comes from the wrong URL being used when decorating, this caused an error in resolve to subsume the original:
file:///Users/bfarias/Documents/oss/import-map-to-policy/src/write-answer/write-answer.js:1import {theAnswer} from 'answer' ^^^^^^^^^SyntaxError: The requested module 'answer' does not provide an export named 'theAnswer' at ModuleJob._instantiate (node:internal/modules/esm/module_job:105:21) at async ModuleJob.run (node:internal/modules/esm/module_job:151:5) at async Loader.import (node:internal/modules/esm/loader:166:24) at async Object.loadESM (node:internal/process/esm_loader:68:5)
The text was updated successfully, but these errors were encountered:
DerekNonGeneric
added
esm
Issues and PRs related to the ECMAScript Modules implementation.
module
Issues and PRs related to the module subsystem.
policy
Issues and PRs related to the policy subsystem.
labels
Mar 20, 2021
esmIssues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.policyIssues and PRs related to the policy subsystem.
What steps will reproduce the bug?
Produce an error in the lines:
node/lib/internal/modules/esm/module_job.js
Lines 116 to 118 in 5f2bb88
How often does it reproduce? Is there a required condition?
Every time.
It is only possible to reproduce with a Loader or Policy.
What is the expected behavior?
See the original error with linkage, preferably decorated properly.
What do you see instead?
The error that was thrown while attempting to decorate the original error.
Additional information
This was discovered by @giltayar on https://github.com/giltayar/import-map-to-policy/tree/127d3b068dc1e984708beed3dc5eaf4b116ff68e , which when running
npm run start:node
produced a very confusing:You can note the
:1
that comes from the wrong URL being used when decorating, this caused an error inresolve
to subsume the original:The text was updated successfully, but these errors were encountered: