Skip to content

regression in esm loader from 10.15.2 to 10.15.3 #26595

@catdad

Description

@catdad
  • Version: 10.15.3
  • Platform: all (I used Ubuntu)
  • Subsystem:

The ESM loader broke between versions 10.15.2 and 10.15.3

Repro steps:

Using request-promise-native as a test case:

npm install request-promise-native@1.0.5

Then create the following test.mjs file:

import lib from 'request-promise-native';

Using node --experimental-modules test.mjs the code executes fine in 10.15.2 but errors in 10.15.3 with the following error:

TypeError: Cannot read property 'onReady' of undefined
    at Module.load (internal/modules/cjs/loader.js:611:22)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/mnt/c/Workspace/Gitlab/preditor/node_modules/psl/index.js:14:19)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions