有angularcli構建我的角應用程序的問題。在構建命令它顯示以下錯誤。我錯過了什麼。構建與角cli
You have to be inside an angular-cli project in order to use the build command.
一個例子很好。但是舊項目存在這個問題。舊項目不是由'ng new'創建的,angular-cli.json和package.json中的條目是手動添加的。這也建立了一會,並與所有使用CLI,棱角分明,rxjs和區域的兼容版本的變化現在它卡與此錯誤
納克--version給了我下面的
angular-cli: 1.0.0-beta.28.3
node: 6.11.1
os: win32 x64
@angular/common: 2.3.1
@angular/compiler: 2.3.1
@angular/core: 2.3.1
@angular/forms: 2.3.1
@angular/http: 2.3.1
@angular/platform-browser: 2.3.1
@angular/platform-browser-dynamic: 2.3.1
@angular/router: 3.4.10
@angular/upgrade: 2.0.2
@angular/compiler-cli: 2.3.1
的package.json具有以下輸入和更
"name": "project1",
"version": "1.0.0",
"description": "Application to capture info",
"angular-cli": {},
...
"dependencies": {
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
"@angular/forms": "^2.3.1",
"@angular/http": "^2.3.1",
"@angular/platform-browser": "^2.3.1",
"@angular/platform-browser-dynamic": "^2.3.1",
...
"devDependencies": {
"@angular/compiler-cli": "^2.3.1",
和標準角cli.json
"apps": [
{
"root": ".",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "app/main.ts",
顯示當前目錄下的CLI – brijmcq
我怎麼在這裏 – Pacchy
目錄添加圖像D:\ workspace \ code \ project.Web 16/08/2017 12:35 PM 1,271 angular-cli.json 07/07/2017 04:42 PM 144,712 package-lock.json 16/08/2017 04: 15 PM 2,368 package.json 16/08/2017 05:53 PM 331 tsconfig.json 22/02/2017 09:44 PM 1,896 tslint.json 22/02/2017 09:44 PM 367 typings.json 6文件150,945字節 0 Dir(s)1,010,323,546,112字節免費 D:\ workspace \ code \ project.Web> ng build - 產品號 你必須在一個angular-cli項目中才能使用build命令 – Pacchy