Needle Engine failed to install on Unity 2021.3.8f1

Lets continue here :slightly_smiling_face:

Seems like a npm path issue but not sure yet - possibly caused by the env variable as described here node.js - NPM: npm-cli.js not found when running npm - Stack Overflow

Full scope of my error.

I installed the latest version of nodejs 18.10.0, npm v8.19.2, but it seems Unity has another version preinstalled because it keeps saying my npm version is deprecated.

I have two projects opened with two path set-up:

**Method 1. **
I clicked on “Run Needle Project Setup” so Needle finds the npm verison itself - this is not working

Errors -
npm ERR!, npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.)

npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)

npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

**Method 2. **
From project settings, I selected my local files as my new npm verisons - this shows play, loads the local host page, but breaks.

Error
npm ERR!

npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.

Installation did not succeed.

by user 1004447976304955515

Relevant error

npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js.3673405497
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js.3673405497'
npm ERR!  [Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\node_modules\npm\bin\npx-cli.js.3673405497'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npx-cli.js.3673405497'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
Open D:\some\path\NeedleSample3\Projects\CollaborativeSandbox/npm ERR! It's possible that the file was already in use
npm ERR! or that you lack permissions to access it.
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Hi! I have a similar issue. I can’t install needle engine:

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path C:\Users\Firstname~1
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, mkdir ‘C:\Users\Firstname~1’
npm ERR! [Error: EPERM: operation not permitted, mkdir ‘C:\Users\Firstname~1’] {
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘mkdir’,
npm ERR! path: ‘C:\Users\Firstname~1’
npm ERR! }
npm ERR!

by user 558970653626073099

Also it creates this folder in C:/Users:

by user 558970653626073099

image.png

by user 558970653626073099

There are only log files with very similar content:

by user 558970653626073099

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@8.19.2
2 info using node@v18.12.1
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 1ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:project Completed in 2ms
10 timing config:load:file:C:\Users\Marosi Csaba.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\Marosi Csaba\AppData\Roaming\npm\etc\npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:validate Completed in 1ms
15 timing config:load:credentials Completed in 0ms
16 timing config:load:setEnvs Completed in 1ms
17 timing config:load Completed in 11ms
18 timing npm:load:configload Completed in 11ms
19 timing npm:load:mkdirpcache Completed in 1ms
20 timing npm:load:mkdirplogs Completed in 0ms
21 verbose title npm prefix
22 verbose argv “prefix” “–global”
23 timing npm:load:setTitle Completed in 0ms
24 timing config:load:flatten Completed in 2ms
25 timing npm:load:display Completed in 4ms
26 verbose logfile logs-max:10 dir:C:\Users\Marosinpm -g install npm~1\AppData\Roaming\npm-cache_logs
27 verbose logfile C:\Users\Marosinpm -g install npm~1\AppData\Roaming\npm-cache_logs\2022-11-14T22_53_49_286Z-debug-0.log
28 timing npm:load:logFile Completed in 4ms
29 timing npm:load:timers Completed in 0ms
30 timing npm:load:configScope Completed in 0ms
31 timing npm:load Completed in 22ms
32 timing command:prefix Completed in 2ms
33 verbose exit 0
34 timing npm Completed in 29ms
35 info ok

by user 558970653626073099

Mkdir fails? Can you try downgrading to node 16 (LTS)?

Ok. I’m going to try. Thank You.

by user 558970653626073099

With node 16 i don’t get errors but it doesn’t seem to work either:

by user 558970653626073099

by user 558970653626073099

And nothing changes here:

by user 558970653626073099

image.png

by user 558970653626073099

Can you go to Edit/ProjectSettings/Needle and send a screenshot of the settings?

by user 558970653626073099

Can you try deleting the paths in the fields and running the setup again?

Unfortunately nothing changed.

by user 558970653626073099

It writes back the paths, but not much else.

by user 558970653626073099