Closed WoobaWooba closed 1 year ago
@WoobaWooba - Which version of node and windows are you running?
I'm running node.js version 16.13.2 on windows 10
Seems to be having trouble finding npm: spawn npm ENOENT
at init line 16.
Based on this SO post, seems like a windows thing not being able to find npm.
Oh nice find @p-mcgowan
I'll spin up windows and give this a whirl at some point this week.
Unless you have not already @WoobaWooba you can also do what the cli-script does by hand, create the scripts in your package.json file and copy out the example files from https://github.com/j-d-carmichael/boats/tree/main/srcOA3 to your local src directory. However reading the error logs it looks like this already got done by the cli script.
resolved on 2.39.0
Describe the bug I followed the Getting Started and tried to run the demo but got the spawn npm enoent error.
To Reproduce
npm init
npm i boats
on the same project as I ran thenpm init
commandnpm run boats -- --init
Error: spawn npm ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn npm', path: 'npm', spawnargs: [ 'install' ] }
PS C:\Users\User\Desktop\openapi\dsl\boats_test2> npm run boats -- --init
Checking version from npm api (ꙨပꙨ) This local version looks fresh and shiny, nice! ? Enter the name of the api file, press enter to use the current package.json name attribute: boats_test2 ? oaType: OpenAPI 3.0.0 ? Press Y and enter to install. This will make a copy of the template files to ./src, an output directory ./build and a config file ./.boatsrc Yes Completed: Injected a .boatsrc file Completed: Installed boats skeleton files to C:/Users/User/Desktop/openapi/dsl/boats_test2/src Completed: Created a build output directory Completed: BOATS build scripts added to your package.json node:events:368 throw er; // Unhandled 'error' event ^
Error: spawn npm ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12) at onErrorNT (node:internal/child_process:477:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn npm', path: 'npm', spawnargs: [ 'install' ] }