В первый раз мне как-то удалось установить пакет в локальный каталог. Но через несколько дней попробовал установить новый пакет, но процесс установки не начался. Я устанавливал через батник, и писал команду
npm i имя_пакета
Сейчас у меня вместо установки в CMD создаётся бесконечный список.
...
F:\nwjs-sdk-v0.72.0>npm i имя_пакета
F:\nwjs-sdk-v0.72.0>npm i имя_пакета
F:\nwjs-sdk-v0.72.0>npm i имя_пакета
... и т.д.
Если запускаю батник от администратора, то установка происходит в System32. Пробовал удалить node.js и заново установить. Chocolatey не обновило пайтхон и визуал, т.к. они и так последней версии.
В интернете просто пишется, что команда запускается не с правильного каталога, но я батник запускаю с
F:\nwjs-sdk-v0.72.0, а не с
System32.
Пробовал даже так установить.
cd "F:\nwjs-sdk-v0.72.0" && npm install
Если без администратора, то просто открывается CMD и закрывается. Если от имени администратора, вот это в логе отображается.
Log. Имя пользователя заменил на username0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@9.3.1
2 info using node@v18.14.0
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 2ms
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 1ms
8 timing config:load:env Completed in 1ms
9 timing config:load:file:C:\WINDOWS\system32\.npmrc Completed in 0ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:C:\Users\username\.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\username\AppData\Roaming\npm\etc\npmrc Completed in 1ms
14 timing config:load:global Completed in 1ms
15 timing config:load:setEnvs Completed in 1ms
16 timing config:load Completed in 10ms
17 timing npm:load:configload Completed in 10ms
18 timing npm:load:mkdirpcache Completed in 0ms
19 timing npm:load:mkdirplogs Completed in 1ms
20 verbose title npm install
21 verbose argv "install"
22 timing npm:load:setTitle Completed in 1ms
23 timing config:load:flatten Completed in 3ms
24 timing npm:load:display Completed in 4ms
25 verbose logfile logs-max:10 dir:C:\Users\username\AppData\Local\npm-cache\_logs\2023-02-11T07_44_35_479Z-
26 verbose logfile C:\Users\username\AppData\Local\npm-cache\_logs\2023-02-11T07_44_35_479Z-debug-0.log
27 timing npm:load:logFile Completed in 5ms
28 timing npm:load:timers Completed in 0ms
29 timing npm:load:configScope Completed in 0ms
30 timing npm:load Completed in 23ms
31 timing config:load:flatten Completed in 1ms
32 timing arborist:ctor Completed in 0ms
33 silly logfile start cleaning logs, removing 4 files
34 timing arborist:ctor Completed in 0ms
35 timing idealTree:init Completed in 11ms
36 timing idealTree:userRequests Completed in 0ms
37 silly idealTree buildDeps
38 timing idealTree:#root Completed in 0ms
39 timing idealTree:buildDeps Completed in 1ms
40 timing idealTree:fixDepFlags Completed in 0ms
41 timing idealTree Completed in 14ms
42 timing reify:loadTrees Completed in 14ms
43 timing reify:diffTrees Completed in 1ms
44 silly reify moves {}
45 timing reify:retireShallow Completed in 1ms
46 timing reify:createSparse Completed in 1ms
47 timing reify:loadBundles Completed in 0ms
48 timing reify:unpack Completed in 0ms
49 timing reify:unretire Completed in 0ms
50 timing build:queue Completed in 0ms
51 timing build:deps Completed in 0ms
52 timing build Completed in 0ms
53 timing reify:build Completed in 1ms
54 timing reify:trash Completed in 0ms
55 timing reify:save Completed in 2ms
56 silly logfile done cleaning log files
57 timing reify Completed in 27ms
58 timing command:install Completed in 31ms
59 verbose stack Error: ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
60 verbose cwd C:\WINDOWS\system32
61 verbose Windows_NT 10.0.19045
62 verbose node v18.14.0
63 verbose npm v9.3.1
64 error code ENOENT
65 error syscall open
66 error path C:\WINDOWS\system32/package.json
67 error errno -4058
68 error enoent ENOENT: no such file or directory, open 'C:\WINDOWS\system32\package.json'
69 error enoent This is related to npm not being able to find a file.
69 error enoent
70 verbose exit -4058
71 timing npm Completed in 180ms
72 verbose code -4058
73 error A complete log of this run can be found in:
73 error C:\Users\username\AppData\Local\npm-cache\_logs\2023-02-11T07_44_35_479Z-debug-0.log