Npm failed with return code: 1

Jasmin Fernando 16 Reputation points
2020-10-04T22:11:05.49+00:00

I am receiving this error when running a pipeline
Can you please help me with this error? I am totally new with this

2020-10-02T11:49:02.0942763Z ##[section]Starting: npm test
2020-10-02T11:49:02.1296697Z ==============================================================================
2020-10-02T11:49:02.1297227Z Task : npm
2020-10-02T11:49:02.1297727Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Azure Artifacts.
2020-10-02T11:49:02.1298087Z Version : 1.175.0
2020-10-02T11:49:02.1298407Z Author : Microsoft Corporation
2020-10-02T11:49:02.1298826Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/package/npm
2020-10-02T11:49:02.1299153Z ==============================================================================
2020-10-02T11:49:02.8146429Z SYSTEMVSSCONNECTION exists true
2020-10-02T11:49:03.1528252Z SYSTEMVSSCONNECTION exists true
2020-10-02T11:49:03.4159379Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" --version"
2020-10-02T11:49:14.0891946Z 6.14.6
2020-10-02T11:49:15.4903504Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" config list"
2020-10-02T11:49:16.0723033Z ; cli configs
2020-10-02T11:49:16.0723364Z metrics-registry = "https://registry.npmjs.org/"
2020-10-02T11:49:16.0723570Z scope = ""
2020-10-02T11:49:16.0723765Z user-agent = "npm/6.14.6 node/v12.18.4 win32 x64"
2020-10-02T11:49:16.0723962Z
2020-10-02T11:49:16.0724225Z ; environment configs
2020-10-02T11:49:16.0724404Z cache = "C:\npm\cache"
2020-10-02T11:49:16.0724596Z prefix = "C:\npm\prefix"
2020-10-02T11:49:16.0724814Z userconfig = "D:\a\_temp\npm\4.npmrc"
2020-10-02T11:49:16.0724988Z
2020-10-02T11:49:16.0725129Z ; builtin config undefined
2020-10-02T11:49:16.0725255Z
2020-10-02T11:49:16.0725454Z ; node bin location = C:\Program Files\nodejs\node.exe
2020-10-02T11:49:16.0725711Z ; cwd = D:\a\r1\a_Test Proj-CI\drop
2020-10-02T11:49:16.0725951Z ; HOME = C:\Users\VssAdministrator
2020-10-02T11:49:16.0726177Z ; "npm config ls -l" to show all defaults.
2020-10-02T11:49:16.0726339Z
2020-10-02T11:49:16.0727705Z [command]C:\windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" test"
2020-10-02T11:49:20.1989126Z [31mError: No test files found [39m
2020-10-02T11:49:20.1989382Z
2020-10-02T11:49:20.1989587Z > sampletest@1.0.0 test D:\a\r1\a_Test Proj-CI\drop
2020-10-02T11:49:20.1995426Z > npx mocha — reporter xunit > result.xml
2020-10-02T11:49:20.1995650Z
2020-10-02T11:49:20.2131159Z npm ERR! Test failed. See above for more details.
2020-10-02T11:49:20.2166067Z ##[warning]Couldn't find a debug log in the cache or working directory
2020-10-02T11:49:20.2177676Z ##[error]Error: Npm failed with return code: 1
2020-10-02T11:49:20.2219325Z ##[section]Finishing: npm test

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,262 questions
{count} vote