DEV Community

MITESH V. KOTHARI
MITESH V. KOTHARI

Posted on

Need help to resolve Error: spawn EINVAL

When I am running following command to create base ADF Alfresco developement framework package
npm install -g generator-alfresco-adf-app@latest

npm warn cleanup 'C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules',
npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules\generator-license'] {
npm warn cleanup errno: -4048,
npm warn cleanup code: 'EPERM',
npm warn cleanup syscall: 'rmdir',
npm warn cleanup path: 'C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules\generator-license'
npm warn cleanup }
npm warn cleanup ]
npm warn cleanup ]
npm error code 1
npm error path C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules\deasync
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js
npm error node:internal/child_process:421
npm error throw new ErrnoException(err, 'spawn');
npm error ^
npm error
npm error Error: spawn EINVAL
npm error at ChildProcess.spawn (node:internal/child_process:421:11)
npm error at Object.spawn (node:child_process:762:9)
npm error at build (C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules\deasync\build.js:76:5)
npm error at Object. (C:\Program Files\nodejs\node_modules\generator-alfresco-adf-app\node_modules\deasync\build.js:67:3)
npm error at Module._compile (node:internal/modules/cjs/loader:1469:14)
npm error at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
npm error at Module.load (node:internal/modules/cjs/loader:1288:32)
npm error at Module._load (node:internal/modules/cjs/loader:1104:12)
npm error at Function.executeUserEntryPoint as runMain
npm error at node:internal/main/run_main_module:28:49 {
npm error errno: -4071,
npm error code: 'EINVAL',
npm error syscall: 'spawn'
npm error }
npm error
npm error Node.js v20.17.0

using npm - 10.8.2

Please suggest what can be done - saw few post - where { shell: true } is required to set - but where ?

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (1)

Collapse
 
mitesh_vkothari_35b01c9 profile image
MITESH V. KOTHARI

Appreciate any help.. Hope this is the right place to raise issue specific to node js / npm.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more