1

我第一次尝试将我的第一个 angular-cli 应用程序部署到 github 页面时遇到以下错误。我该如何解决?

“您必须在 angular-cli 项目中才能使用 github-pages:deploy 命令。”

[18:07:12] (gh-pages) ang-cli
// ♥ ls -l
total 1480
drwxr-xr-x+  7 Dan  staff     238 May 13 17:11 app
drwxr-xr-x+ 10 Dan  staff     340 May 13 17:11 dist
-rw-r--r--+  1 Dan  staff    5430 May 13 17:11 favicon.ico
-rw-r--r--+  1 Dan  staff    1102 May 13 17:11 index.html
-rw-r--r--+  1 Dan  staff  735813 May 13 17:11 main.js
drwxr-xr-x+ 93 Dan  staff    3162 May 13 17:19 node_modules
-rw-r--r--+  1 Dan  staff    1572 May 13 17:11 system-config.js
drwxr-xr-x+ 43 Dan  staff    1462 May 13 17:11 tmp
-rw-r--r--+  1 Dan  staff     455 May 13 17:11 tsconfig.json
drwxr-xr-x+  6 Dan  staff     204 May 13 16:21 typings
drwxr-xr-x+  6 Dan  staff     204 May 13 17:11 vendor
[18:07:19] (gh-pages) ang-cli
// ♥ ng github-pages:deploy --message "Initial deployment"
You have to be inside an angular-cli project in order to use the github-pages:deploy command.
[18:07:30] (gh-pages) ang-cli
4

1 回答 1

0

我有同样的问题。我是这样固定的。

git pull origin master

如果你在 github 上有远程项目,请把它写在上面。我认为您对 angular-cli 有不同的文件夹结构。

于 2016-07-25T21:12:44.860 回答