我正在使用https://www.youtube.com/watch?v=nxV3weqMzYo这个视频来实时部署我的角度2应用程序,但它给出了以下错误
D:\selva\backup\ticketing>ngh
An error occurred!
Error: Unspecified error (run without silent option for detail)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\gh-pages\lib\index.js:232:19
at _rejected (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-gh
pages\node_modules\q\q.js:844:24)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\q\q.js:870:30
at Promise.when (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli
-ghpages\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\Users\selva\AppData\Roaming\npm\node_
modules\angular-cli-ghpages\node_modules\q\q.js:788:41)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\q\q.js:604:44
at runSingle (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-gh
pages\node_modules\q\q.js:137:13)
at flush (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpage
s\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
请帮我纠正此错误
预期行为:将票务项目部署到github页面
我做的步骤
第1步:ng-build --prod
第2步:将所有文件推送到github,包括node_modules和dist文件夹
我已经清除了#34; .gitignore"中的所有数据。文件将所有项目数据上传到github帐户(包括node_modules和dist文件夹)
第3步:ng-build --prod --base-href https://selva1990kumar.github.io/ticketing/
第4步:ngh
IT产生此错误
An error occurred!
Error: Unspecified error (run without silent option for detail)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\gh-pages\lib\index.js:232:19
at _rejected (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-gh
pages\node_modules\q\q.js:844:24)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\q\q.js:870:30
at Promise.when (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli
-ghpages\node_modules\q\q.js:1122:31)
at Promise.promise.promiseDispatch (C:\Users\selva\AppData\Roaming\npm\node_
modules\angular-cli-ghpages\node_modules\q\q.js:788:41)
at C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpages\node_
modules\q\q.js:604:44
at runSingle (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-gh
pages\node_modules\q\q.js:137:13)
at flush (C:\Users\selva\AppData\Roaming\npm\node_modules\angular-cli-ghpage
s\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
答案 0 :(得分:5)
首先运行此操作以获取详细信息
ngh --no-silent
然后,如果你收到这样的错误
message: '\n*** Please tell me who you are
刚跑:
git config --global user.email“you@example.com”
而且这个:
git config --global user.name“Github用户名”
最后:
ngh
答案 1 :(得分:3)
我跑了
sudo ngh --dir dist/[PROJECT-NAME]
希望有帮助
答案 2 :(得分:2)
我遇到了同样的错误。
通过命令解决:
sudo ngh