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

JetLogger import in @ceramicnetwork/common is causing an error #2386

Open
ottodevs opened this issue Aug 19, 2022 · 2 comments
Open

JetLogger import in @ceramicnetwork/common is causing an error #2386

ottodevs opened this issue Aug 19, 2022 · 2 comments

Comments

@ottodevs
Copy link

This import seems to be causing an error:

import { LoggerModes, JetLogger as Logger } from 'jet-logger'

Error:

import { LoggerModes, JetLogger as Logger } from 'jet-logger';
                      ^^^^^^^^^
SyntaxError: Named export 'JetLogger' not found. The requested module 'jet-logger' 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 'jet-logger';
const { LoggerModes, JetLogger: Logger } = pkg;

Following the advice and replacing the import seems to fix the error:

import pkg from 'jet-logger';
const { LoggerModes, JetLogger: Logger } = pkg;
@ottodevs ottodevs changed the title Loggers import is causing an error Loggers import in @ceramicnetwork/common is causing an error Aug 19, 2022
@ottodevs
Copy link
Author

Adding more context:

The package jet-logger does not have any named export for JetLogger, that is probably causing the issue

@ottodevs ottodevs changed the title Loggers import in @ceramicnetwork/common is causing an error JetLogger import in @ceramicnetwork/common is causing an error Aug 19, 2022
@oed
Copy link
Member

oed commented Aug 19, 2022

This was addressed here: #2384
A hotfix is incoming!

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