npm ОШИБКА! ELIFECYCLE 1 - PullRequest
       42

npm ОШИБКА! ELIFECYCLE 1

0 голосов
/ 27 января 2020

Создание веб-страницы ранее с помощью React и развертывание ее на GitHub Pages в прошлом вручную. Пошел обновлять страницу и теперь отказывается обновляться. Пытаясь использовать пакет gh-pages, и всякий раз, когда я запускаю «npm run deploy», я получаю этот код ошибки.

npm вывод:

> gh-pages -d build

events.js:298
      throw er; // Unhandled 'error' event
      ^

Error: spawn git ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn git',
  path: 'git',
  spawnargs: [ 'config', 'user.name' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sigtaucolostate@0.1.0 deploy: `gh-pages -d build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sigtaucolostate@0.1.0 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Nick Early\AppData\Roaming\npm-cache\_logs\2020-01-26T23_18_19_706Z-debug.log 

npm cahce log :

1 verbose cli [
1 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'deploy'
1 verbose cli ]
2 info using npm@6.13.6
3 info using node@v13.7.0
4 verbose run-script [ 'predeploy', 'deploy', 'postdeploy' ]
5 info lifecycle sigtaucolostate@0.1.0~predeploy: sigtaucolostate@0.1.0
6 verbose lifecycle sigtaucolostate@0.1.0~predeploy: unsafe-perm in lifecycle true
7 verbose lifecycle sigtaucolostate@0.1.0~predeploy: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Nick Early\Documents\GitHub\sigtaucolostate\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Java\jdk1.8.0_161\bin;;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\Nick Early\AppData\Local\Microsoft\WindowsApps;C:\Users\Nick Early\AppData\Local\GitHubDesktop\bin;C:\Users\Nick Early\AppData\Roaming\npm;C:\Users\Nick Early\AppData\Local\Programs\Microsoft VS Code\bin
8 verbose lifecycle sigtaucolostate@0.1.0~predeploy: CWD: C:\Users\Nick Early\Documents\GitHub\sigtaucolostate
9 silly lifecycle sigtaucolostate@0.1.0~predeploy: Args: [ '/d /s /c', 'npm run build' ]
10 silly lifecycle sigtaucolostate@0.1.0~predeploy: Returned: code: 0  signal: null
11 info lifecycle sigtaucolostate@0.1.0~deploy: sigtaucolostate@0.1.0
12 verbose lifecycle sigtaucolostate@0.1.0~deploy: unsafe-perm in lifecycle true
13 verbose lifecycle sigtaucolostate@0.1.0~deploy: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Nick Early\Documents\GitHub\sigtaucolostate\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Java\jdk1.8.0_161\bin;;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\Nick Early\AppData\Local\Microsoft\WindowsApps;C:\Users\Nick Early\AppData\Local\GitHubDesktop\bin;C:\Users\Nick Early\AppData\Roaming\npm;C:\Users\Nick Early\AppData\Local\Programs\Microsoft VS Code\bin
14 verbose lifecycle sigtaucolostate@0.1.0~deploy: CWD: C:\Users\Nick Early\Documents\GitHub\sigtaucolostate
15 silly lifecycle sigtaucolostate@0.1.0~deploy: Args: [ '/d /s /c', 'gh-pages -d build' ]
16 silly lifecycle sigtaucolostate@0.1.0~deploy: Returned: code: 1  signal: null
17 info lifecycle sigtaucolostate@0.1.0~deploy: Failed to exec deploy script
18 verbose stack Error: sigtaucolostate@0.1.0 deploy: `gh-pages -d build`
18 verbose stack Exit status 1
18 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
18 verbose stack     at EventEmitter.emit (events.js:321:20)
18 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
18 verbose stack     at ChildProcess.emit (events.js:321:20)
18 verbose stack     at maybeClose (internal/child_process.js:1026:16)
18 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
19 verbose pkgid sigtaucolostate@0.1.0
20 verbose cwd C:\Users\Nick Early\Documents\GitHub\sigtaucolostate
21 verbose Windows_NT 10.0.18362
22 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "deploy"
23 verbose node v13.7.0
24 verbose npm  v6.13.6
25 error code ELIFECYCLE
26 error errno 1
27 error sigtaucolostate@0.1.0 deploy: `gh-pages -d build`
27 error Exit status 1
28 error Failed at the sigtaucolostate@0.1.0 deploy script.
28 error This is probably not a problem with npm. There is likely additional logging output above.
29 verbose exit [ 1, true ] 

Уже пытались очистить кэш npm, удалить npm_modules, выполнить установку fre sh и удалить блокировку пакетов. json

...