Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Failed to spawn process, ENOENT: no such file or directory

Open
#553 3 comments 0 reactions 0 assignees View on GitHub

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

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-lua/plenary.nvim

All issues in nvim-lua/plenary.nvim

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.