Skip to content
This repository was archived by the owner on Aug 4, 2021. It is now read-only.
This repository was archived by the owner on Aug 4, 2021. It is now read-only.

"name-is-not-exported-by-module" for default export #206

@gcharnock

Description

@gcharnock

I'm attempting to use rollup for the first time, and I've encountered errors that look like "Error: 'foo' is not exported by node_modules/fast-json-patch/src/json-patch-duplex.js" a few times. The advice suggested by the error message has generally worked.

https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module

However, what do I do when the object I want is the default export from the module? I've tried:

namedExports: {
    "node_modules/fast-json-patch/src/json-patch-duplex.js": ["default"]
}

Though I wan't really expecting the above to work (what if the module exported a non-default property called "default"?) and it didn't. I'm not sure what to do.

I'm sorry if this turns out to be a stupid question. All the previous "modern" javascript I've done has been server side. I'm finding all the seemingly countless module systems extremely confusing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions