Я обновил свой проект для использования рабочей области angular и хотел бы развернуть мое демонстрационное приложение, используя angular -gh-pages. Репозиторий https://github.com/Gillardo/ngx-bootstrap-datetime-popup
Я создал команду в пакете. json с именем gh-pages, которая выполняет команду ng deploy demo --no-silent
, но когда я ее запускаю, я получаю эту ошибку в консоль. Кажется, что проект успешно построен, но не удается загрузить его на git?
Я запускаю его на windows 10 машине.
Может кто-нибудь помочь, пожалуйста?
?? Uploading via git, please wait...
Cloning https://github.com/Gillardo/ngx-bootstrap-datetime-popup/ into node_modules\gh-pages\.cache\github.com!Gillardo!ngx-bootstrap-datetime-popup
Cleaning
Fetching origin
Checking out origin/gh-pages
❌ An error occurred when trying to deploy:
git-upload-pack '.': git-upload-pack: command not found
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
В дополнение к комментариям я запустил SET GIT_TRACE=1
в командной строке windows, а затем снова запустил код, вот что я получил
Я сделал это, удалив весь репозиторий, запустив npm install
, чтобы установить мои node_modules, а затем запустив npm run gh-pages
, который я настроил в качестве команды, и запустил это, как в моем пакете. json "gh-pages": "ng deploy demo --no-silent"
Не уверен, что это что-то меняет, но в моем файле angular. json я установил
РЕДАКТИРОВАТЬ: Вот текст на картинке, когда он потерпел неудачу
�� Uploading via git, please wait...
Cloning https://github.com/Gillardo/ngx-bootstrap-datetime-popup.git into node_modules\gh-pages\.cache\github.com!Gillardo!ngx-bootstrap-datetime-popup.git
❌ An error occurred when trying to deploy:
Remote url mismatch. Got "12:21:47.470038 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin" but expected "https://github.com/Gillardo/ngx-bootstrap-datetime-popup.git" in node_modules\gh-pages\.
cache\github.com!Gillardo!ngx-bootstrap-datetime-popup.git. Try running the `gh-pages-clean` script first.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ngx-bootstrap-datetime-popup@5.1.0 gh-pages 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\Darren\AppData\Roaming\npm-cache\_logs\2020-05-03T11_21_47_564Z-debug.log
А вот что было в этом журнале, что полезно
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Darren\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'gh-pages' ]
2 info using npm@6.4.0
3 info using node@v10.15.3
4 verbose run-script [ 'pregh-pages', 'gh-pages', 'postgh-pages' ]
5 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~pregh-pages: ngx-bootstrap-datetime-popup@5.1.0
6 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: ngx-bootstrap-datetime-popup@5.1.0
7 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: unsafe-perm in lifecycle true
8 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: PATH: C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Github\ngx-bootstrap-datetime-popup\node_modules\.bin;D:\Github\ngx-bootstrap-datetime-popup\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;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\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Users\Darren\AppData\Local\Microsoft\WindowsApps;C:\Users\Darren\AppData\Local\GitHubDesktop\bin;C:\Users\Darren\.dotnet\tools;C:\Users\Darren\AppData\Local\Microsoft\WindowsApps;;C:\Users\Darren\AppData\Local\Programs\Fiddler;C:\Users\Darren\AppData\Roaming\npm;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
9 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: CWD: D:\Github\ngx-bootstrap-datetime-popup
10 silly lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Args: [ '/d /s /c', 'ng deploy demo --no-silent' ]
11 silly lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Returned: code: 1 signal: null
12 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Failed to exec gh-pages script
13 verbose stack Error: ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid ngx-bootstrap-datetime-popup@5.1.0
15 verbose cwd D:\Github\ngx-bootstrap-datetime-popup
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Darren\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "gh-pages"
18 verbose node v10.15.3
19 verbose npm v6.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
22 error Exit status 1
23 error Failed at the ngx-bootstrap-datetime-popup@5.1.0 gh-pages script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Если я запустить `SET" GIT_TRACE = "перед запуском команды я получаю это
Checking out origin/gh-pages
❌ An error occurred when trying to deploy:
error: cannot spawn sh: No such file or directory
fatal: unable to fork
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
npm ERR! Exit status 1
И журнал говорит это
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Darren\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'gh-pages' ]
2 info using npm@6.4.0
3 info using node@v10.15.3
4 verbose run-script [ 'pregh-pages', 'gh-pages', 'postgh-pages' ]
5 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~pregh-pages: ngx-bootstrap-datetime-popup@5.1.0
6 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: ngx-bootstrap-datetime-popup@5.1.0
7 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: unsafe-perm in lifecycle true
8 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: PATH: C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Github\ngx-bootstrap-datetime-popup\node_modules\.bin;D:\Github\ngx-bootstrap-datetime-popup\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;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\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\nodejs\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\dotnet\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Users\Darren\AppData\Local\Microsoft\WindowsApps;C:\Users\Darren\AppData\Local\GitHubDesktop\bin;C:\Users\Darren\.dotnet\tools;C:\Users\Darren\AppData\Local\Microsoft\WindowsApps;;C:\Users\Darren\AppData\Local\Programs\Fiddler;C:\Users\Darren\AppData\Roaming\npm;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
9 verbose lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: CWD: D:\Github\ngx-bootstrap-datetime-popup
10 silly lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Args: [ '/d /s /c', 'ng deploy demo --no-silent' ]
11 silly lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Returned: code: 1 signal: null
12 info lifecycle ngx-bootstrap-datetime-popup@5.1.0~gh-pages: Failed to exec gh-pages script
13 verbose stack Error: ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Darren\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid ngx-bootstrap-datetime-popup@5.1.0
15 verbose cwd D:\Github\ngx-bootstrap-datetime-popup
16 verbose Windows_NT 10.0.18363
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Darren\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "gh-pages"
18 verbose node v10.15.3
19 verbose npm v6.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error ngx-bootstrap-datetime-popup@5.1.0 gh-pages: `ng deploy demo --no-silent`
22 error Exit status 1
23 error Failed at the ngx-bootstrap-datetime-popup@5.1.0 gh-pages script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]