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.

betterer start fails under yarn pnp with "Error: spawn ENOTDIR"

See original GitHub issue

Describe the bug

When using yarn 3 with the PnP linker, betterer start fails to start, and crashes with the exception

> yarn run betterer
node:internal/child_process:412
    throw errnoException(err, 'spawn');
    ^

Error: spawn ENOTDIR
    at ChildProcess.spawn (node:internal/child_process:412:11)
    at spawn (node:child_process:698:9)
    at Command._executeSubCommand ([...]/.yarn/cache/commander-npm-5.1.0-7e939e7832-0b7fec1712.zip/node_modules/commander/index.js:802:16)
    at Command._dispatchSubcommand ([...]/.yarn/cache/commander-npm-5.1.0-7e939e7832-0b7fec1712.zip/node_modules/commander/index.js:863:12)
    at Command._parseCommand ([...]/.yarn/cache/commander-npm-5.1.0-7e939e7832-0b7fec1712.zip/node_modules/commander/index.js:882:12)
    at Command.parse ([...]/.yarn/cache/commander-npm-5.1.0-7e939e7832-0b7fec1712.zip/node_modules/commander/index.js:717:10)
    at Object.cli__ ([...]/.yarn/cache/@betterer-cli-npm-5.0.0-9be8e081f3-7894f32096.zip/node_modules/@betterer/cli/dist/cli.js:51:25)
    at Object.<anonymous> ([...]/.yarn/cache/@betterer-cli-npm-5.0.0-9be8e081f3-7894f32096.zip/node_modules/@betterer/cli/bin/betterer:2:24)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'spawn'
}

To Reproduce

  1. git clone git@github.com:grafana/grafana.git
  2. git switch joshhunt/betterer
  3. yarn
  4. yarn betterer

Expected behavior

It works! 😅

Versions (please complete the following information):

  • OS: Windows w/WSL running Ubuntu 18.04.2 LTS
  • Betterer Version: ^5.0.0
  • Node Version: v16.13.0

Debug log:

No additional output. Betterer crashes before this option takes effect.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
phenomnomnominalcommented, Dec 6, 2021

Okay, I think this is working! I took your PR branch and updated it to latest (v5.1.5), and it seems to be working now. Let me know if it is the same at your end @joshhunt

1reaction
phenomnomnominalcommented, Nov 26, 2021

Yeah that was my suspicion as well - I have been wanting to replace commander with more Ink stuff, and I have 8 hours on a plane tomorrow, so I will hopefully have an update soon. I also have a fix incoming for the React stuff.

Super cool that you want to try it out for Grafana, let me know if there’s anything else I can do to help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] open: spawn ENOTDIR #856 - yarnpkg/berry - GitHub
I'm having this problem with webpack-dev-server . If I use the --open option yarn start throws this spawn ENOTDIR error.
Read more >
Gets ENOTDIR error when yarn start for expo project
But when I run yarn start I get below error node:internal/errors:465 ErrorCaptureStackTrace(err); ^ Error: spawn ENOTDIR at ...
Read more >
Troubleshooting | Yarn
This error simply means that the specified package is requiring something without explicitly declaring it in its dependencies. Since this behavior is unsafe ......
Read more >
How to fix the installing packages with yarn trace error spawn ...
This case was mentioned in the Nuxt project creation post. Anyway, there is a simple solution to this problem. All you need to...
Read more >
Using Yarn 2 causes ENOMEM - Questions / Help - Fly.io
I've upgraded one of my projects to use Yarn 2, which involves using “yarn node .” instead of “node .” to configure Node...
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