Yarn Berry + inspect/debugger mode fails
See original GitHub issueWhat version of Next.js are you using?
10.0.5
What version of Node.js are you using?
14.3.0
What browser are you using?
Firefox, but irrelevant
What operating system are you using?
macOS
How are you deploying your application?
Not deployed
Describe the Bug
If you use yarn berry
with pnp mode on, and try to add NODE_OPTIONS='--inspect'
to your dev command, it crashes.
Expected Behavior
It should run your app with the debugger on.
To Reproduce
- Clone https://github.com/osdiab/berry-inspect-nextjs
yarn && yarn dev
Example was created as follows:
yarn create next-app berry-inspect-nextjs
cd berry-inspect-nextjs
yarn set version berry
rm -rf node_modules
yarn
- Edit
package.json
"dev"
script to have prefixNODE_OPTIONS='--inspect'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Error Codes | Yarn - Package Manager
This error means that this process failed and Yarn cannot successfully figure out which version of the package should be added to your...
Read more >esproj crashes when running the project using Yarn Berry ...
When we run the project (F5), it crashes with this error: Verbose logs are written to: C:\Users\.....\AppData\Local\Temp\visualstudio-js-debugger.
Read more >How to debug Jest Tests when using Yarn 2 / Yarn PnP
The usual way to access a binary in yarn 2 of yarn run --inspect-brk jest --runInBand launches a debugging session from the terminal,...
Read more >Using modern Yarn for deployment with Node.js on Azure App ...
With Yarn 2.x and greater (called Yarn 'Berry') is what is now billed as ... Do not interfere with requests for node-inspector debugging ......
Read more >JavaScript package managers compared: npm, Yarn, or pnpm?
Yarn Berry goes even further by ditching node_modules completely with its Plug'n'Play (PnP) mode. In this article, we'll cover the following ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The repository you’re linking to is empty, but the issue is that you’re overriding the env variable set by Yarn. You need to preserve the original one
Or you can tell Yarn to add it for you
https://yarnpkg.com/cli/run#options-inspect
Look at the examples in https://github.com/vercel/next.js/issues/21270#issuecomment-769925932