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.

[Bug] open: spawn ENOTDIR

See original GitHub issue
  • I’d be willing to implement a fix

Describe the bug

Yarn 2 PnP breaking library open, since it brings it own xdg-open script when to be used, but childProcess.spawn() can’t address the script while the package is zipped.

To Reproduce

await packageJsonAndInstall({
  dependencies: {
    open: "^7.0.1"
  }
});

const open = require("open");
await expect(open("https://google.com")).rejects.not.toThrow('spawn ENOTDIR');

Screenshots

If applicable, add screenshots to help explain your problem.

Environment if relevant (please complete the following information):

  • OS: Linux
  • Node: v10.16.0
  • Yarn: 2.0.0-rc.27

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:25 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
wdfinchcommented, Apr 24, 2021

Sorry for the late reply on this and thanks for the help. Unplugging opn solved my issue. I was thinking to unplug open instead since that is the name of the library/command being used. Thanks for the help.

0reactions
johnrichardrinehartcommented, Apr 25, 2021

@christopherschwaab Did you have the same problem? How did you know the package?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I debug "Error: spawn ENOENT" on node.js?
NOTE: This error is almost always caused because the command does not exist, because the working directory does not exist, or from a...
Read more >
spawn terraform ENOENT when running Terraform in Azure ...
A quick blog post to detail the simple fix of when you see the error: spawn terraform ENOENT when running your Terraform within...
Read more >
Azure CLI Build Task Script failed with error: Error: spawn ...
Your open channel to Microsoft engineering teams ... finds the file but i get the error "Script failed with error: Error: spawn UNKNOWN"...
Read more >
Error: spawn ENOTDIR - Serverless Forums
Hi, at the moment I see this error when I was trying to run sls deploy on my local.
Read more >
Original error: Could not sign with default certificate. Original ...
Hi everybody, I've been trying to create a simple script to open browser but i run into this problem. ... Original error spawn...
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