2017-09-02 40 views
0

对于我的角度CLI /到位桶项目我正在按照Codeship脚本,但它给错误You have to be inside an angular-cli project in order to use the serve command.代码船失败,错误 - 你必须是一个角CLI项目中才能使用的服务命令

#install node version, 4.x is required for the angular-cli 
nvm install 4.1 

#install angular-cli 
npm install angular-cli 

#run npm install for your project dependencies 
npm install 

在该脚本下是“Test Pipelines”,其中脚本设置为运行测试。

#serve the application adding '&' to run command in background 
ng serve & 

#start end to end tests using protractor 
ng test 

#if all of the tests pass, then build the production assets 
ng build -prod 
+0

Ahoy :)从错误消息来看,它似乎是'ng' CLI不能将项目识别为Angular项目。出于好奇,你是否已经在https://helpdesk.codeship.com上创建了一张票,如果没有,你可以创建一个并包含链接到失败的构建?我们很高兴看一看,并帮助你解决这个问题。 – mlocher

+0

我已经提出这张票。我被告知运行SSH调试,但我发现很难遵循这些步骤。即使在我添加了ssh密钥后,控制台要求输入'password',我认为它不应该 - Ticket是https://helpdesk.codeship.com/hc/en-us/requests/15489 –

+0

好吧,让我看看那张票,然后回到那里。 – mlocher

回答

0

根据https://github.com/angular/angular-cli/issues/4379如果你使用(废弃)angular-cli包通常是引发此错误消息。

请更新项目的package.json文件以引用@angular/cli软件包,或确保安装此软件包而不是已弃用的软件包。

+0

对不起,不能帮你用Shippable,特别是没有任何日志文件。您是否尝试了我对Codeship的建议并查看它是否正常工作(或者因另一个错误导致了不同的错误消息而失败)? – mlocher

+0

我的歉意,我感到困惑。我不应该混淆他们。我会尝试删除我的评论并尝试您的建议。 –

+0

无法正常工作:(。新配置是'#install节点版本,角色cli需要4.x。nvm install 6 你的项目依赖关系 npm install' –

相关问题