Я подготовил сценарий powershell в конвейере сборки Azure Devops для создания артефакта, но когда я запускаю очередь сборки, я получаю сообщение об ошибке ниже.
Команда build должна выполняться в проекте Angular, но
определение проекта не найдено.
Может кто-нибудь помочь мне, пожалуйста.
Скрипт Powershell:
npm install
npm install -g typescript
npm install -g @angular/cli
ng build --configuration=production
Это все результат сценария powershell:
##[section]Starting: PowerShell Script
==============================================================================
Task : PowerShell
Description : Run a PowerShell script on Windows, macOS, or Linux.
Version : 2.148.0
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613736)
==============================================================================
Generating script.
========================== Starting Command Output ===========================
##[command]"C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'd:\a\_temp\90129c3e-4840-41d7-895c-2f9c8f6e5968.ps1'"
npm WARN saveError ENOENT: no such file or directory, open 'D:\a\1\s\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'D:\a\1\s\package.json'
npm WARN s No description
npm WARN s No repository field.
npm WARN s No README data
npm WARN s No license field.
up to date in 5.231s
found 0 vulnerabilities
C:\npm\prefix\tsc -> C:\npm\prefix\node_modules\typescript\bin\tsc
C:\npm\prefix\tsserver -> C:\npm\prefix\node_modules\typescript\bin\tsserver
+ typescript@3.4.5
updated 1 package in 2.063s
C:\npm\prefix\ng -> C:\npm\prefix\node_modules\@angular\cli\bin\ng
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\@angular\cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ @angular/cli@7.3.9
added 295 packages from 180 contributors in 88.373s
The build command requires to be run in an Angular project, but a project definition could not be found.
##[error]PowerShell exited with code '1'.
##[section]Finishing: PowerShell Script