Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chalk problem #21

Closed
salk52 opened this issue Jan 12, 2022 · 3 comments
Closed

Chalk problem #21

salk52 opened this issue Jan 12, 2022 · 3 comments

Comments

@salk52
Copy link

salk52 commented Jan 12, 2022

Line 1 in multi-progress-bars.mjs

import { green } from 'chalk';

throws exception

import { green } from 'chalk';
^^^^^
SyntaxError: Named export 'green' not found. The requested module 'chalk' 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:

I'm using node 16

so it should be

import chalk from 'chalk';
const { green } = chalk;

@kamiyo
Copy link
Owner

kamiyo commented Jan 12, 2022

Duplicate of #18. Actually fixed on 4.2.2-0 prerelease, but I haven't had time to push an actual release out. I'll notify you when I do.

@salk52
Copy link
Author

salk52 commented Jan 13, 2022

ah, sry, my mistake...

thanx

@salk52 salk52 closed this as completed Jan 13, 2022
@kamiyo
Copy link
Owner

kamiyo commented Jan 13, 2022

No worries, wasn't clear from the title of that issue that the problem was the same. Enjoy!

Edit: oh, and 4.2.2 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants