fix: find root dir on fs root (#82590)
Attempt at fixing from our side: https://github.com/vercel/next.js/issues/82577 Rather, the issue is that when the project is at the root of the file system - `findRootDir` loops indefinitely, and we keep pushing to the lockFiles found. I also noticed the warning claims we use the last lockfile found, but we return `dirname(lockfile)` - that is the first lock file found. Regardless, when using this project setup: ```console . ├── apps │ └── frontend │ ├── README.md │ ├── next.config.ts │ ├── package.json │ ├── pnpm-lock.yaml │ ├── src │ │ └── app │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx │ └── tsconfig.json ├── package.json ├── pnpm-lock.yaml └── pnpm-workspace.yaml ``` Running `pnpm --filter frontend dev` still ends up in panic: `Error [TurbopackInternalError]: Next.js package not found` - Maybe that's still expected :) As for https://github.com/vercel/next.js/issues/82577 - a way for them to get unblocked is to use a `WORKDIR`. More details on that issue thread. --------- Co-authored-by:Luke Sandberg <lukesandberg@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment