Skip to content
This repository was archived by the owner on Jun 15, 2025. It is now read-only.
This repository was archived by the owner on Jun 15, 2025. It is now read-only.

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

@scsmash3r

Description

@scsmash3r

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:
create-socket-app@1.1.5
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:
create-socket-app@1.1.5
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...
> npm-ssc-preprod@1.0.0 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions