部署Angular 4应用程序

前端之家收集整理的这篇文章主要介绍了部署Angular 4应用程序前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用 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文件

这里我清除了“.gitignore”文件中的所有数据,将所有项目数据上传到github帐户(包括node_modules和dist文件夹)

第3步:ng-build –prod –base-href https://selva1990kumar.github.io/ticketing/

第4步:呃

它产生了这个错误

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)

首先运行此以获取详细信息

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 User Name”

最后:

ngh

猜你在找的Angularjs相关文章