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

dayjs does not provide an export named 'default' #4320

Open
azat-io opened this issue Apr 19, 2023 · 8 comments
Open

dayjs does not provide an export named 'default' #4320

azat-io opened this issue Apr 19, 2023 · 8 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@azat-io
Copy link

azat-io commented Apr 19, 2023

Description

When I'm using mermaid I get dayjs does not provide an export named 'default' error

Steps to reproduce

https://github.com/azat-io/mermaid-dayjs-bug

  1. pnpm install
  2. pnpm start

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: 10.1.0
  • Browser and Version: Chrome

Additional Context

azat-io/vuepress-plugin-mermaid-wrapper#1

@aloisklink
Copy link
Member

Might be fixed by #4285 (it's been merged, so should appear in the next NPM release).

@sidharthv96
Copy link
Member

@derHodrig
Copy link

derHodrig commented Jul 27, 2023

10.3.0 still having this error

Edit: Maybe its more nuxt related issue in my case.
For fellow users

add to nuxt.config.ts of your highest layer (not the base)

....
// mermaid fix
  vite: {
    optimizeDeps: {
      include: [
        'mermaid'
      ]
    }
  }
....

more info at nuxt/nuxt#19426

@dspinov
Copy link

dspinov commented Oct 2, 2023

I have the same issue. It seems the root cause is usign pnpm as a manager. If I install package through npm then all is good. Can we somehow unblock using pnpm installer?

@jgreywolf jgreywolf added roadmap items to add to roadmap for auto workflow and removed roadmap items to add to roadmap for auto workflow labels Nov 16, 2023
@chenbimo
Copy link

chenbimo commented Dec 2, 2023

10.6.1 still having this error

@chenbimo
Copy link

chenbimo commented Dec 2, 2023

10.3.0 still having this error

Edit: Maybe its more nuxt related issue in my case. For fellow users

add to nuxt.config.ts of your highest layer (not the base)

....
// mermaid fix
  vite: {
    optimizeDeps: {
      include: [
        'mermaid'
      ]
    }
  }
....

more info at nuxt/nuxt#19426

Very thanks for your answer! It's useful!

@Sun-ZhenXing
Copy link

Currently, the latest version (mermaid@10.7.0) also has this problem, which occurs when using vite@5.0.12.

The above temporary fix works.

This shouldn't be a big deal, but hopefully a fix will be provided soon for vite.

@alaxcc
Copy link

alaxcc commented May 4, 2024

I fixed it, I can't just use element-plus or dayjs-nuxt model, you need install dayjs too,

pnpm install dayjs

and fix.

@thepassle thepassle mentioned this issue Jun 20, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

9 participants