Closed Bug 1107650 Opened 7 years ago Closed 4 years ago

toolkit/loader must lookup node_modules relative to reqiurer first before jumping to a rootURI

Categories

(Add-on SDK Graveyard :: General, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: irakli, Unassigned)

References

Details

No description provided.
This is caused when instrumenting your own loader (unlikely to run into in traditional jpm usage), and requiring files outside of the rootURI children path. Example:

rootURI: /Projects/my-projects/project

And scaffolding a require for something out of that path like:

/Projects/other-project/module

That require, with `/Projects/other-project/module` as the requirer, will attempt to look up node_modules within `/Projects/my-projects/project` rather than recursively going up looking for node_modules, up until the rootURI.

A possible issue with this is since the look up is not under rootURI, this could recursively go up to `/` looking for the node module.
Priority: -- → P2
https://bugzilla.mozilla.org/show_bug.cgi?id=1399562
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.