Turbopack does not resolve "local" linked/file dependencies. #65125
Labels
bug
Issue was opened via the bug report template.
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
Runtime
Related to Node.js or Edge Runtime with Next.js.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/YeetmanLord/NextJsError/tree/main
To Reproduce
npm run build
to build the code.npm run dev
which executesnext dev --turbo
.localhost:3000
).Error should be outputted at this point.
Current vs. Expected behavior
Turbopack is not resolving locally included dependencies. By "locally included dependency", I mean libraries that are added to a project either through a direct file inclusion (through package.json and "file:<path_to_dependency>") or through
npm link <package-name>
. Both methods include a link/shortcut to the relevant package.I would assume that it is the directory link that is causing the issue.
This is the page output without tacking on
--turbo
tonext dev
(so packaged using Webpack):Turbopack should resolve linked packages just as it would resolve packages installed into node_modules.
Provide environment information
Which area(s) are affected? (Select all that apply)
Runtime, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
As far as I can tell, this error has always been around. I tested with next versions 13.0.0, 13.5.6, 14.0.0, 14.1.0, 14.2.0, 14.2.3, and 14.3.0-canary.29.
With 14.2.3, the stacktrace outputted into console is such:
Module not found: Can't resolve 'ui-library'
PACK-3026
The text was updated successfully, but these errors were encountered: