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.

Error: spawn eslint ENOENT

See original GitHub issue

I’m trying to migrate the project from lint-staged to nano-staged. Installed. Replaced configuration:

  "nano-staged": {
    "*.{js,ts,vue}": "eslint --cache --fix"
  },

Run

$ npx nano-staged
Nano Staged v0.3.1
- Preparing pipeliner...
  » Done backing up original repo state.
- Running tasks...
  *.{js,ts,vue} eslint --cache --fix
- Restoring to its original state...
  » Done restoring up to its original state.
- Removing patch files...
  » Done removing up patch files.

eslint --cache --fix:
Error: spawn eslint ENOENT

This is repeated with any command

  "nano-staged": {
    "*.{js,ts,vue}": "npx eslint --cache --fix"
  },
$ npx nano-staged
Nano Staged v0.3.1
- Preparing pipeliner...
  » Done backing up original repo state.
- Running tasks...
  *.{js,ts,vue} npx eslint --cache --fix
- Restoring to its original state...
  » Done restoring up to its original state.
- Removing patch files...
  » Done removing up patch files.

npx eslint --cache --fix:
Error: spawn npx ENOENT
  "nano-staged": {
    "*.{js,ts,vue}": "npm run lint"
  },
$ npx nano-staged
Nano Staged v0.3.1
- Preparing pipeliner...
  » Done backing up original repo state.
- Running tasks...
  *.{js,ts,vue} npm run lint
- Restoring to its original state...
  » Done restoring up to its original state.
- Removing patch files...
  » Done removing up patch files.

npm run lint:
Error: spawn npm ENOENT

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
usmanyunusovcommented, Dec 1, 2021

@cinic @cawa-93

I solve the problem

1reaction
cawa-93commented, Dec 3, 2021

@cawa-93 works?

Yeap. I successfully migrated my template to nano

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I debug "Error: spawn ENOENT" on node.js?
Spawn may emit the ENOENT error if the filename command (i.e, 'some-command') does not exist in at least one of the directories defined...
Read more >
spawn node ENOENT" when using child_process in Node.js
Have you ever stumbled upon this error when using spawn from Node.js' child_process module? ~/demo $ node main.js. ~/demo/main.js: ...
Read more >
Error: spawn ENOENT · Issue #36 · standard/standard - GitHub
I am on Windows 7 (64-bit) and did npm install standard -g and tried doing it. I get this error: c:\wamp\www\qtsite\src\js (master) λ ......
Read more >
[Solved-5 Solutions] Error spawn enoent on node.js - Wikitechy
Spawn may emit the ENOENT error if the filename command (i.e, 'some-command') does not exist in at least one of the directories defined...
Read more >
errno: -4058, code: 'enoent', syscall: 'spawn git', path - You.com
This error typically indicates that the system cannot find the specified path to the git binary, which means that either the system does...
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