question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inject NODE_OPTIONS will cause Node 10.x crash when fork child process

See original GitHub issue

Describe the bug

some users of our project report an issue, when running cnpm install at vscode, it will crash.

Error: Command failed: /Users/sunny/Documents/Workspace/My/dingtalk-robot-server/node_modules/node/bin/node -e "process.stdout.write(JSON.stringify(process.versions))"
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module '"/Users/sunny/Library/Application'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
$ echo ${NODE_OPTIONS}
--require "/Users/sunny/Library/Application Support/Code/User/workspaceStorage/0566b62ed6c96028f6eca701b9ac9d1e/ms-vscode.js-debug/bootloader.js"

To Reproduce Steps to reproduce the behavior:

after a long dig, we found it seems a bug of Node 10.x

see https://github.com/atian25/node-bug-report

just a notify for you, free to close this issue.

Log File

VS Code Version: Replace me!

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
connor4312commented, Sep 25, 2020

This will be fixed in the next nightly build; when running an npm script we will now prepend node_modules/.bin to the path for discovery.

1reaction
iFwucommented, Sep 27, 2020

@connor4312 I think there’s still a problem after switching the node version to v10 without changing the autoAttachFilter flag. Do I need to open another issue for it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

node js child fork crashing parent on exception - Stack Overflow
Im have a parent node which forking process like so : var cp = require('child_process').fork('./p1.js ...
Read more >
How JavaScript works: building a child process in Node.js
Ever run into an issue where a request to the server is blocked by an ongoing process? And new requests have to wait...
Read more >
Node.js v19.3.0 Documentation
Indicates the failure of an assertion. All errors thrown by the node:assert module will be instances of the AssertionError class. new assert.AssertionError( ...
Read more >
Execa 2 release — process execution for humans - codeburst
fork () ) executes a Node.js script as a child process. It uses the current Node version and options. This can be overridden...
Read more >
Node.js Child Processes: Everything you need to know
How to use spawn(), exec(), execFile(), and fork() > Update: This article is now part of my book “Node.js Beyond The Basics”.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found