You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Side note, I think import.meta.resolve should work like import.meta.url and actually point to the file system instead of what require.resolve does right now which ends up with a path like (rsc)/../../.
Link to the code that reproduces this issue
https://github.com/souporserious/next-import-meta-resolve-bug
To Reproduce
Attempt to use
import.meta.resolve('./any-path')
in a Server or Client ComponentCurrent vs. Expected behavior
import.meta.resolve('./any-path')
should work as expected with Node.js20.8.0
and above, currently this error is thrown when attempting to use it:Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 21.2.0 npm: 10.8.1 Yarn: 1.22.21 pnpm: 9.9.0 Relevant Packages: next: 15.1.6 // Latest available version is detected (15.1.6). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.7.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Webpack, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: