Skip to content

Commit

Permalink
Prevents exception on PnP (#9951)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis authored and nicolo-ribaudo committed Jun 1, 2019
1 parent 84961eb commit d7801c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/babel-node/src/babel-node.js
Expand Up @@ -73,7 +73,12 @@ getV8Flags(function(err, v8Flags) {
const kexec = require("kexec");
kexec(process.argv[0], args);
} catch (err) {
if (err.code !== "MODULE_NOT_FOUND") throw err;
if (
err.code !== "MODULE_NOT_FOUND" &&
err.code !== "UNDECLARED_DEPENDENCY"
) {
throw err;
}

const child_process = require("child_process");
const proc = child_process.spawn(process.argv[0], args, {
Expand Down

1 comment on commit d7801c6

@smooth-opperator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been included in a release? I tried using latest "@babel/node": "^7.4.5" but still getting the error

Package "@babel/node@7.4.5"  is trying to require the package "kexec" without it being listed in its dependencies 

Please sign in to comment.