Skip to content

Usage for Typescript / ES6 Error #94

@mortonmills

Description

@mortonmills

I'm fairly new to working with packages and modules,
but I received an error in Node when using the Typescript / ES6 syntax
as shown in the Usage section of the README.

import { JZZ } from 'jzz';
         ^^^
SyntaxError: Named export 'JZZ' not found. The requested module 'jzz' is a CommonJS module, 
which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'jzz';
const { JZZ } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)

Node.js v19.9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions