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_resolve_absolute_path__ is not a function #66005

Closed
stratospark opened this issue May 21, 2024 · 2 comments · Fixed by vercel/turbo#8549 or #67215
Closed

__turbopack_resolve_absolute_path__ is not a function #66005

stratospark opened this issue May 21, 2024 · 2 comments · Fixed by vercel/turbo#8549 or #67215
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

@stratospark
Copy link

stratospark commented May 21, 2024

Link to the code that reproduces this issue

https://github.com/stratospark/turbopack-test

To Reproduce

  1. clone the repo
  2. bun i
  3. bun run dev -- --turbo
  4. Navigate to http://localhost:3000/sqlite

Current vs. Expected behavior

The page should build and I should see Using SQLite version: 3.44.0 in the console. Instead getting an error about __turbopack_resolve_absolute_path__ when trying to load the wa-sqlite code.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:43 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 21.6.2
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.2.3 // Latest available version is detected (14.2.3).
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
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

Could it be related to

@stratospark stratospark added the bug Issue was opened via the bug report template. label May 21, 2024
@github-actions github-actions bot added the Turbopack Related to Turbopack with Next.js. label May 21, 2024
@timneutkens timneutkens added the linear: turbopack Confirmed issue that is tracked by the Turbopack team. label May 23, 2024
@timneutkens
Copy link
Member

timneutkens commented May 24, 2024

It's definitely triggered by import.meta.url, it's used here to decide _scriptDir: https://unpkg.com/browse/wa-sqlite@1.0.0/dist/wa-sqlite-async.mjs

Did some digging and found that P: resolveAbsolutePath, is missing in runtime-base.ts but it is provided in runtime.ts.

runtime-base.ts is used for the browser while runtime.ts is used for Node.js.

We'll dig into it further and get it fixed 👍

Copy link
Contributor

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 locked as resolved and limited conversation to collaborators Jul 11, 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
2 participants