Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm init riot failed spawn npm ENOENT error #15

Open
7 tasks
mikeshimura opened this issue Nov 14, 2024 · 9 comments
Open
7 tasks

npm init riot failed spawn npm ENOENT error #15

mikeshimura opened this issue Nov 14, 2024 · 9 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@mikeshimura
Copy link

Help us to manage our issues by answering the following

  1. Describe your issue: npm init riot commnd failed with following message.

  2. Can you reproduce the issue?

Post the link using one of our bug report templates:

  1. On which browser/OS does the issue appear?

  2. Which version of Riot does it affect?

  3. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@mikeshimura
Copy link
Author

create-riot

node:internal/child_process:285
const err = new ErrnoException(exitCode, syscall);
^

Error: spawn npm ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:285:19)
at onErrorNT (node:internal/child_process:483:16)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [ 'init' ],
cmd: 'npm',
args: [ 'init' ],
stdout: null,
stderr: null
}

Node.js v22.11.0
npm error code 1
npm error path C:\Users\mikes
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c create-riot

@mikeshimura
Copy link
Author

I have 2 pcs, both shows same message

@mikeshimura
Copy link
Author

C:\Users\mikes>node -v
v22.11.0

C:\Users\mikes>npm -v
10.9.0

@mikeshimura
Copy link
Author

in directory C:\Users\Masanobu Shimura\AppData\Local\npm-cache_npx\91a95858ebf364cb\node_modules.bin
create-riot.cmd is exist.

@mikeshimura
Copy link
Author

set PATH=%PATH%;C:\Users\Masanobu Shimura\AppData\Local\npm-cache_npx\91a95858ebf364cb\node_modules.bin
then create-riot shows same error message

@GianlucaGuarini GianlucaGuarini transferred this issue from riot/riot Nov 15, 2024
@GianlucaGuarini
Copy link
Member

Thank you for reporting this issue. I don't use windows and the error seems to come from node internals. Have you the same error using older node versions for example v20?

@mikeshimura
Copy link
Author

I tried 20.18.0 but same status as below.

Error: spawn npm ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:286:19)
at onErrorNT (node:internal/child_process:484:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [ 'init' ],
cmd: 'npm',
args: [ 'init' ],
stdout: null,
stderr: null
}

Node.js v20.18.0
npm error code 1
npm error path C:\a\wkriot
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c create-riot
npm error A complete log of this run can be found in: C:\Users\mikes\AppData\Local\npm-cache_logs\2024-11-15T23_08_45_713Z-debug-0.log

@mikeshimura
Copy link
Author

I tried with windows linux wsl2 and it work normal.

@GianlucaGuarini
Copy link
Member

I tried with windows linux wsl2 and it work normal.

So it worked on windows via wsl2, the problem seems to exist only in windows cmd.exe.
Could you please try the powershell?
Also which windows version are you using?

@GianlucaGuarini GianlucaGuarini self-assigned this Nov 22, 2024
@GianlucaGuarini GianlucaGuarini added the help wanted Extra attention is needed label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants