Skip to content

Node 14.13 problematic (default?) import combinations #35483

@arlac77

Description

@arlac77

There are some import combinations which do not work together any longer (each import alone works fine)

  • Version:v14.13.0
  • Platform: Darwin mbpMarkus 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Subsystem:

What steps will reproduce the bug?

import recast from "recast";
import lockfile from '@yarnpkg/lockfile';

How often does it reproduce? Is there a required condition?

Always (starting with node 14.13)

What is the expected behavior?

two default exports provided

What do you see instead?

node issue.mjs 
node_modules/recast/lib/lines.js:580
    assert_1.default.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string);
                     ^

TypeError: assert_1.default.ok is not a function
    at fromString (node_modules/recast/lib/lines.js:580:22)
    at Object.<anonymous> (/node_modules/recast/lib/lines.js:654:18)
    at Module._compile (internal/modules/cjs/loader.js:1085:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:791:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (node_modules/recast/lib/parser.js:11:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:30)

Additional information

Saw the problem with other combinations of imports to

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.esmIssues and PRs related to the ECMAScript Modules implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions