Skip to content

Module main file name remains in cache, causing issues when main file is changed in newer versions #4332

Closed
@julianduque

Description

@julianduque

Re-opening this issue here by @indutny request
Related: nodejs/node-v0.x-archive#8266
Reproduction case: https://gist.github.com/sbellone/3947632a42be73553abb

Module._pathCache and var packageMainCache do not play well when you switch between different versions of the same module. I suggest that the version (or the compressed package-url) should be included in the cache key

Metadata

Metadata

Assignees

No one assigned

    Labels

    moduleIssues and PRs related to the module subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions