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

Error when importing from 'debug' #13

Closed
dchenk opened this issue Jan 28, 2022 · 0 comments
Closed

Error when importing from 'debug' #13

dchenk opened this issue Jan 28, 2022 · 0 comments

Comments

@dchenk
Copy link
Contributor

dchenk commented Jan 28, 2022

I just added version 0.5.0 to a project with Vite at 2.7.10 but I'm getting the following error on build:

import { debug as debug$1 } from 'debug';
         ^^^^^
SyntaxError: Named export 'debug' not found. The requested module 'debug' 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 'debug';
const { debug: debug$1 } = pkg;

The source of the error is the file node_modules/vite-plugin-compression/dist/index.mjs.

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

1 participant