如何解决Azure DevOps离子管道生成错误?

问题描述 投票:0回答:1

我正在尝试在Azure DevOps管道中使用Hosted macOS代理构建Ionic框架。我有以下构建步骤。

  1. 安装npm @ latest -g(NPM)

  2. install -g @ ionic / app-scripts @ latest --save-dev(NPM)

  3. npm i -g ionic @ latest --verbose(Ionic CLI)

  4. build ios(Ionic CLI)

enter image description here

但是我收到以下错误。

2018-11-15T02:36:25.4788550Z ==============================================================================
2018-11-15T02:36:25.4788690Z Task         : Ionic Command
2018-11-15T02:36:25.4788740Z Description  : Run an Ionic CLI command
2018-11-15T02:36:25.4788770Z Version      : 1.3.12
2018-11-15T02:36:25.4788800Z Author       : Microsoft Corporation
2018-11-15T02:36:25.4788900Z Help         : [More Information](http://go.microsoft.com/fwlink/?LinkID=692057)
2018-11-15T02:36:25.4788940Z ==============================================================================
2018-11-15T02:36:25.9506080Z Module cache at /Users/vsts/.taco_home/node_modules
2018-11-15T02:36:26.9844280Z cordova already installed.
2018-11-15T02:36:26.9845750Z Cordova Module Path: /Users/vsts/.taco_home/node_modules/cordova/8.1.2/node_modules/cordova
2018-11-15T02:36:26.9849330Z Module cache at /Users/vsts/.taco_home/node_modules
2018-11-15T02:36:27.9211450Z ionic already installed.
2018-11-15T02:36:27.9213230Z Ionic Module Path: /Users/vsts/.taco_home/node_modules/ionic/4.3.1/node_modules/ionic
2018-11-15T02:36:28.4726980Z [WARN] ionic build is for building web assets and takes no arguments. See ionic build --help.
2018-11-15T02:36:28.4727450Z        
2018-11-15T02:36:28.4727570Z        Ignoring argument ios. Perhaps you meant ionic cordova build ios?
2018-11-15T02:36:28.4727640Z        
2018-11-15T02:36:28.5020530Z > ionic-app-scripts build
2018-11-15T02:36:30.8035540Z [02:36:30]  ionic-app-scripts 3.2.0 
2018-11-15T02:36:30.8054190Z [02:36:30]  build dev started ... 
2018-11-15T02:36:30.8621960Z [02:36:30]  ionic-app-script task: "build" 
2018-11-15T02:36:30.8622700Z [02:36:30]  Error: ENOENT: no such file or directory, open 
2018-11-15T02:36:30.8623700Z             '/Users/vsts/agent/2.142.1/work/1/s/MyApp/node_modules/@angular/core/package.json' 
2018-11-15T02:36:30.8630180Z Error: ENOENT: no such file or directory, open '/Users/vsts/agent/2.142.1/work/1/s/MyApp/node_modules/@angular/core/package.json'
2018-11-15T02:36:30.8632330Z     at Error (native)
2018-11-15T02:36:30.8807840Z [ERROR] An error occurred while running subprocess ionic-app-scripts.
2018-11-15T02:36:30.8808230Z         
2018-11-15T02:36:30.8809020Z         ionic-app-scripts build exited with exit code 1.
2018-11-15T02:36:30.8809110Z         
2018-11-15T02:36:30.8809730Z         Re-running this command with the --verbose flag may provide more information.
2018-11-15T02:36:30.9233030Z ##[error]Task failed
2018-11-15T02:36:30.9263660Z ##[section]Finishing: Ionic Command build ios
ionic-framework azure-devops azure-devops-self-hosted-agent
1个回答
0
投票

同一期。

错误:ENOENT:没有这样的文件或目录,请打开@ angular / core / package.json

© www.soinside.com 2019 - 2024. All rights reserved.