An error is occurring only during the Npm@1 task on the DevOps pipeline, while the app builds without issues locally. The Angular CLI version is 8.3.29 and TypeScript version is 3.5.3.
The custom command being executed is:
run build:artifact
This command points to the following in package.json
:
ng build --configuration=artifact
The error message thrown is as follows:
../node_modules/@types/lodash/common/lang.d.ts:577:74 - error TS2677: A type predicate's type must be assignable to its parameter's type.
Full log from the pipeline:
Starting: Angular Build
==============================================================================
Task : npm
Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
Version : 1.202.0
Author : Microsoft Corporation
Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/package/npm
==============================================================================
C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\node\14.15.0\x64\npm.cmd --version"
6.14.8
C:\Windows\system32\cmd.exe /D /S /C "C:\hostedtoolcache\windows\node\14.15.0\x64\npm.cmd config list"
... (omitted for brevity)
...
Do you know how to track down where this error is being triggered?
When running the same command [
ng build --configuration=artifact
] manually on a local dev box with matching node\npm versions, no errors occur.
...