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

[Bug?]: pnpm linker does not preserve name of package directory #6269

Open
1 task
kherock opened this issue May 3, 2024 · 0 comments
Open
1 task

[Bug?]: pnpm linker does not preserve name of package directory #6269

kherock opened this issue May 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kherock
Copy link
Contributor

kherock commented May 3, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

Certain packages seem to care about the name of the folder that they reside in (namely Next.js).

For example, I get this error while trying to build my site with Next.js 14:

Error: Invariant: Expected relative import to start with "next/", found "package/dist/server/future/route-modules/pages/module.compiled"

To reproduce

This should be reproducible on any Next.js project with the pnpm linker enabled. In case it matters, I am using the pages router still.

Environment

System:
    OS: macOS 13.6.4
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.12.1 - /private/var/folders/9f/kl_c86q5651fqmhmzf63jb0x5t_d9j/T/xfs-bad117dc/node
    Yarn: 4.2.1 - /private/var/folders/9f/kl_c86q5651fqmhmzf63jb0x5t_d9j/T/xfs-bad117dc/yarn
    npm: 10.5.0 - /opt/homebrew/bin/npm

Additional context

No response

@kherock kherock added the bug Something isn't working label May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant