Answer the question
In order to leave comments, you need to log in
Why doesn't NODE_OPTIONS work?
I want to add a Debug command, I added the configuration
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"port": 9229
}
]
}
"scripts": {
"dev": "next dev",
"debug": "NODE_OPTIONS='--inspect' next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"stylelint": "stylelint \"**/*.css\"--fix"
Answer the question
In order to leave comments, you need to log in
1. install cross-env ( npm i -D cross-env
)
2. point in the "scripts" section to the desired cross-env command, for example:
"debug": "cross-env NODE_OPTIONS='--inspect' next dev"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question