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

Turbopack: --turbo couldn't dayjs molude resolution within cal-heatmap library. #66826

Closed
ryota-murakami opened this issue Jun 13, 2024 · 6 comments · Fixed by vercel/turborepo#8823
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.

Comments

@ryota-murakami
Copy link
Contributor

Link to the code that reproduces this issue

https://github.com/ryota-murakami/reproduction-turbopack-can-not-find-dayjs-local-module

To Reproduce

  1. pnpm install
  2. pnpm dev --turbo
  3. You'll encounter the issue

If you run with pnpm dev, the issue not happen.

Current vs. Expected behavior

Expect Behavior(current 'next dev' behavior)

Show heatmap correctly.

Screenshot 2024-06-13 at 20 56 44

Current Behavior

Build error turbo couldn't resolve import("dayjs/locale/~.

Screenshot 2024-06-13 at 20 57 41

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 12
Binaries:
  Node: 22.2.0
  npm: 10.7.0
  Yarn: 1.22.22
  pnpm: 9.3.0
Relevant Packages:
  next: 15.0.0-canary.28 // Latest available version is detected (15.0.0-canary.28).
  eslint-config-next: N/A
  react: 19.0.0-rc-6f23540c7d-20240528
  react-dom: 19.0.0-rc-6f23540c7d-20240528
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

I'd like to create UI similar to Github weed, so I tried Cal-Heatmap library in side project.
I use to next dev --turbo by default so I encountered this issue.

I'm glad to this report will help Turbopack get a little closer to Webpack's drop in replacement. 😄

@ryota-murakami ryota-murakami added the bug Issue was opened via the bug report template. label Jun 13, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label Jun 13, 2024
@ryota-murakami ryota-murakami changed the title Turbopack: Turbopack: --turbo couldn't dayjs molude resolution within cal-heatmap library. Jun 13, 2024
@ForsakenHarmony ForsakenHarmony added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label Jun 13, 2024
@ForsakenHarmony
Copy link
Contributor

The import unfortunately is too dynamic for turbopack to analyze, I'm not sure if this is something that can be fixed soon.

@ryota-murakami
Copy link
Contributor Author

@ForsakenHarmony Thanks for your hard work on this project! I noticed that the import is too dynamic for Turbopack to analyze. Hope this can be resolved. Keep up the great work!

@timneutkens
Copy link
Member

@sokra mentioned we'll likely have to support the .concat case as webpack analyzes it too

@ForsakenHarmony
Copy link
Contributor

Will be fixed with the next canary after turbopack is updated

@ryota-murakami
Copy link
Contributor Author

@ForsakenHarmony Thank you!

ForsakenHarmony added a commit that referenced this issue Jul 25, 2024
…repo#8823)

### Description

Adds support for `String.prototype.concat` which `dayjs` uses in an
`import()` pattern.

### Testing Instructions

Closes PACK-3118
Fixes #66826
ForsakenHarmony added a commit that referenced this issue Jul 29, 2024
…repo#8823)

### Description

Adds support for `String.prototype.concat` which `dayjs` uses in an
`import()` pattern.

### Testing Instructions

Closes PACK-3118
Fixes #66826
ForsakenHarmony added a commit that referenced this issue Jul 29, 2024
…repo#8823)

### Description

Adds support for `String.prototype.concat` which `dayjs` uses in an
`import()` pattern.

### Testing Instructions

Closes PACK-3118
Fixes #66826
ForsakenHarmony added a commit that referenced this issue Aug 1, 2024
…repo#8823)

### Description

Adds support for `String.prototype.concat` which `dayjs` uses in an
`import()` pattern.

### Testing Instructions

Closes PACK-3118
Fixes #66826
Copy link
Contributor

github-actions bot commented Aug 8, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot added the locked label Aug 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. linear: turbopack Confirmed issue that is tracked by the Turbopack team. locked Turbopack Related to Turbopack with Next.js.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants