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

Next starter app fails to launch when using Yarn 2 PnP #33163

Closed
imdavidmin opened this issue Jan 10, 2022 · 4 comments
Closed

Next starter app fails to launch when using Yarn 2 PnP #33163

imdavidmin opened this issue Jan 10, 2022 · 4 comments
Labels
bug Issue was opened via the bug report template.

Comments

@imdavidmin
Copy link

Run next info (available from version 12.0.8 and up)

No response

What version of Next.js are you using?

12.0.7

What version of Node.js are you using?

16.13.1

What browser are you using?

Chromium Edge

What operating system are you using?

Windows

How are you deploying your application?

Local

Describe the Bug

Internal server error message visiting localhost:3000

Expected Behavior

Show Vercel / Next.js starter page as expected.

To Reproduce

Followed the instruction from here:
https://nextjs.org/docs/getting-started

Creates the repo okay, but when running yarn dev shows error

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
error - ./.yarn/__virtual__/next-virtual-bd727ec14e/0/cache/next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip/node_modules/next/dist/client/dev/amp-dev.js
Error: Failed to read source code from C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\client\dev\amp-dev.js

Caused by:
    The system cannot find the path specified. (os error 3)
wait  - compiling...
error - ./.yarn/__virtual__/next-virtual-bd727ec14e/0/cache/next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip/node_modules/next/dist/client/dev/webpack-hot-middleware-client.js
Error: Failed to read source code from C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\client\dev\webpack-hot-middleware-client.js

Caused by:
    The system cannot find the path specified. (os error 3)
wait  - compiling...
error - ./.yarn/__virtual__/next-virtual-bd727ec14e/0/cache/next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip/node_modules/next/dist/client/dev/webpack-hot-middleware-client.js
Error: Failed to read source code from C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\client\dev\webpack-hot-middleware-client.js

Caused by:
    The system cannot find the path specified. (os error 3)
(node:23228) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
(Use `node --trace-deprecation ...` to show where the warning was created)
wait  - compiling /_error (client and server)...
error - ./.yarn/__virtual__/next-virtual-bd727ec14e/0/cache/next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip/node_modules/next/dist/client/dev/error-overlay/format-webpack-messages.js
Error: Failed to read source code from C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\client\dev\error-overlay\format-webpack-messages.js
Caused by:
    The system cannot find the path specified. (os error 3)

When navigating to localhost:3000, the below appears.

error - Error: Qualified path resolution failed - none of those files can be found on the disk.

Source path: C:\Code\.Starters\next-js\next-starter-12\.next\fallback-build-manifest.json
Not found: C:\Code\.Starters\next-js\next-starter-12\.next\fallback-build-manifest.json
Not found: C:\Code\.Starters\next-js\next-starter-12\.next\fallback-build-manifest.json.js
Not found: C:\Code\.Starters\next-js\next-starter-12\.next\fallback-build-manifest.json.json
Not found: C:\Code\.Starters\next-js\next-starter-12\.next\fallback-build-manifest.json.node

Require stack:
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\server\load-components.js
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\build\utils.js
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\build\output\store.js
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\build\output\index.js
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\cli\next-dev.js
- C:\Code\.Starters\next-js\next-starter-12\.yarn\__virtual__\next-virtual-bd727ec14e\0\cache\next-npm-12.0.7-4cffaa57c8-78a0ebd697.zip\node_modules\next\dist\bin\next
Error: Qualified path resolution failed - none of those files can be found on the disk.
@imdavidmin imdavidmin added the bug Issue was opened via the bug report template. label Jan 10, 2022
@imdavidmin
Copy link
Author

Further investigation shows using Yarn 2 PnP introduces this error,

Current workaround: Revert to node_modules

  1. Create .yarnrc.yml as per migration instructions , with the file content being nodeLinker: node-modules
  2. Run yarn install in the project folder. This installs all dependencies in node_modules folder format.
  3. Run yarn dev as per normal.

@imdavidmin imdavidmin changed the title Next starter app fails to launch Next starter app fails to launch when using Yarn 2 PnP Jan 10, 2022
@imdavidmin
Copy link
Author

Possible duplicate of #32115

@balazsorban44
Copy link
Member

Does sound like a duplicate of #32115

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Feb 10, 2022
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.
Projects
None yet
Development

No branches or pull requests

2 participants