Failed to spawn process, ENOENT: no such file or directory
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- lua, node.js
- Domain
- operating-systems, tooling
Research direction
Start by reproducing the plenary.job process-spawn failure on Windows 11 with the supplied npm command and inspect the job spawning path. Compare how the command and PATH are passed to the Windows process launcher. Done means the reported command starts successfully on Windows or the limitation is documented with a verified workaround.
Written by the indexing model from the issue text.
Description
Hi everyone, I have the following code:
local Job = require "plenary.job"
Job:new({
"npm",
"info",
"anuglar",
"versions",
"--json",
on_exit = function(job)
local result = job:result()
print(vim.inspect(result))
end,
}):start()
But it throws the following exception:
Failed to spawn process: {
_additional_on_exit_callbacks = {},
_shutdown_check = <userdata 1>,
_stderr_results = {},
_stdout_results = {},
_user_on_exit = <function 1>,
args = { "info", "anuglar", "versions", "--json" },
command = "npm",
enable_handlers = true,
enable_recording = true,
interactive = true,
pid = "ENOENT: no such file or directory",
stderr = <userdata 2>,
stdin = <userdata 3>,
stdout = <userdata 4>,
user_data = {},
}
My initial hunch was that NPM is not present in path, but it is. I can run the same command in terminal and I also verified the output of $env:PATH that nodejs and npm is present. I have also verified that vim sees the correct paths with vim.inspect(vim.env.PATH), which contains C:\\Program Files\\nodejs;, which is the location of my nodejs and npm .
My plenary version is latest at this moment i.e. 4f71c0c4a196ceb656c824a70792f3df3ce6bb6d
Neovim version v0.9.5
OS: Microsoft Windows 11 Pro - 10.0.22631 N/A Build 22631
I think it might be windows related issue? Anyone have a clue please?
- Dominant language
- Lua
- Stars
- 3.5k
- Forks
- 340
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nvim-lua/plenary.nvim
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
nvim-lua/plenary.nvim#682 ·
-
uniform usage of `os.getenv`Possibly taken @rakotomandimby claimed this 115 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
nvim-lua/plenary.nvim#680 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
nvim-lua/plenary.nvim#675 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
nvim-lua/plenary.nvim#672 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
nvim-lua/plenary.nvim#671 · 1 comment ·
All issues in nvim-lua/plenary.nvim
Similar issues
-
agent-butler-finding chore
Difficulty 1/5 Under an hour Newbie friendliness 92/100
codymikol/multiverse.nvim#372 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
fabriziosalmi/wildbox#647 ·
Maintainers usually reply within 1 day
-
bug(cosh): copilot-shell postun erase guard never fires (arg index)Possibly taken @yyqdbngt claimed this today. Opencomponent:cosh
Difficulty 1/5 Under an hour Newbie friendliness 91/100
agentic-os-org/ANOLISA#4490 · 1 comment ·
Maintainers usually reply within 1 day
-
1.severity: security
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NixOS/nixpkgs#569828 · 1 reaction ·
Maintainers usually reply within 1 day
-
setup annotation treats all default settings as requiredPossibly taken @oriori1703 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
mason-org/mason.nvim#2114 ·