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

Unable to create socket files: Error: spawn EINVAL #64

Open
scsmash3r opened this issue Nov 1, 2024 · 0 comments
Open

Unable to create socket files: Error: spawn EINVAL #64

scsmash3r opened this issue Nov 1, 2024 · 0 comments

Comments

@scsmash3r
Copy link

There is an issue with Node v.22 and up, and this is a breakdown on that one:
https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2#command-injection-via-args-parameter-of-child_processspawn-without-shell-option-enabled-on-windows-cve-2024-27980---high

Full debug output:

sc@SC MINGW64 /e/projects/npm-ssc-preprod
$ npx create-socket-app -h
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
usage: npm create socket-app [react | react-ts | svelte | tonic | vanilla | vue]

sc@SC MINGW64 /e/projects/npm-ssc-preprod
$ npm create socket-app svelte
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
Initializing npm package...Ok.
Installing developer dependencies...Ok.
Installing dependencies...Ok.
Adding package scripts...Ok.
Creating socket files...
Unable to create socket files: Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:420:11)
    at spawn (node:child_process:759:9)
    at main (file:///C:/Users/sc/AppData/Local/npm-cache/_npx/c1dc6c5b122b41fc/node_modules/create-socket-app/index.js:233:25)
Ok.
Updating project configuration...
Unable to read socket.ini: Error: ENOENT: no such file or directory, open 'E:\projects\npm-ssc-preprod\socket.ini'
    at async open (node:internal/fs/promises:638:25)
    at async Object.readFile (node:internal/fs/promises:1238:14)
    at async main (file:///C:/Users/sc/AppData/Local/npm-cache/_npx/c1dc6c5b122b41fc/node_modules/create-socket-app/index.js:286:14)
npm ERR! code 1
npm ERR! path E:\projects\npm-ssc-preprod
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c create-socket-app svelte

While doing the same npm create socket-app svelte command, but with node v.20.10.0, there is no issues spotted, and process goes as intended:

sc@SC MINGW64 /e/projects/npm-ssc-preprod
$ npm create socket-app svelte
Initializing npm package...Ok.
Installing developer dependencies...Ok.
Installing dependencies...Ok.
Adding package scripts...Ok.
Creating socket files...
> [email protected] init-project
> ssc init --config

• project name: npm-ssc-preprod 1ms
• socket.ini created in E:\projects\npm-ssc-preprod 6ms
Ok.
Updating project configuration...Ok.
Copying project boilerplate...Ok.

Type 'npm start' to launch the app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant