Hi,
I added NPM INSTALL to PHASE 1. The Build failed with this error:
2018-05-01T18:19:25.7802426Z ##[section]Starting: npm install
2018-05-01T18:19:25.8020360Z ==============================================================================
2018-05-01T18:19:25.8020587Z Task : npm
2018-05-01T18:19:25.8020724Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Package Management.
2018-05-01T18:19:25.8020882Z Version : 1.0.15
2018-05-01T18:19:25.8020981Z Author : Microsoft Corporation
2018-05-01T18:19:25.8021099Z Help : More Information
2018-05-01T18:19:25.8021222Z ==============================================================================
2018-05-01T18:19:26.6681290Z [command]C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files\nodejs\npm.cmd" --version"
2018-05-01T18:19:30.7267018Z 3.10.8
2018-05-01T18:19:30.8037891Z ##[error]Error: Please change your working directory to a valid directory
2018-05-01T18:19:30.8072404Z ##[section]Finishing: npm install
Do you know how to fix this issue?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Adding the package area owner to help out with this! @alexmullans. If you think we need to update the docs let me know, Alex.
Hi,
To solve the problem, I:
And then it worked.
I am also experiencing this issue.
I tried to add Node Tool Installer and it updated the PATH to the directory of where it tries to run the NPM install request but the Npm install still throws the same error...
Tried today facing the same issue. Also tried the workaround by ranouf, but no luck.
This the configuration of my Build, I hope it will help you:




Reopening and retagging @alexmullans for awareness.
For others encountering this issue, what is the value of the "Working folder with package.json" input in the npm task?
The @ranouf solution works. Thank you!
Closing this for now as we haven't heard much in a while and it looks like we have a solution for the few that we have heard from.
thank you @ranouf !!!
Most helpful comment
This the configuration of my Build, I hope it will help you:



