Inspect flag passed to babel-spawned Node.js processes #16863
Unanswered
nicholaschiang
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Bug report
Describe the bug
This is similar to the issue described in #11030 but definitely worth a new issue (because using babel plugins and wanting code coverage stats is a common use case).
I'm using a combination of Istanbul packages to instrument my Typescript code for code coverage stats:
babel-plugin-istanbul
source-map-support
ts-node
nyc
@istanbuljs/nyc-config-typescript
@cypress/code-coverage
I've got my development script defined in
package.json
as:I'm guessing that the
babel-plugin-istanbul
package (which is run by Next.js during compilation) is trying to spawn sub-processes using theNODE_OPTIONS=--inspect
option which results in the following error:This is described in the Next.js documentation but the docs fail to suggest a way to prevent babel plugins from using the
NODE_OPTIONS
passed to the originalnext dev
command.To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
with-typescript
example with Istanbul code instrumentation added):Expected behavior
Next.js should ensure that none of the babel and webpack plugins try to use the
NODE_OPTIONS
passed to the originalnext dev
command.System information
Additional context
Some more details about my code instrumentation setup:
My custom
.babelrc
looks like:My
nyc
configuration (included in mypackage.json
):I'm also using the
@cypress/code-coverage
package to generate nice static HTML renderings of the source-mapped code coverage (but that isn't really relevant to this issue and thus isn't included in the repro).Beta Was this translation helpful? Give feedback.
All reactions