Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi i need a script (bat or ps.1) to generate node_modules as they are not checked in by the team to the repository. Im doing a XAML build from Visual Studio IDE the build agent folder is like D:builds\2\projectname\buildname\src\code\. I need the node_modules inside that D:builds\2\projectname\buildname\src\code\ folder where my package.json is and rest of the code is present. I have checked in the ps.1 script with npm install command and passing in the pre-build script section of the process but it is firing at D:builds\2\projectname\buildname\src\ with npm err saying package.json is not found and some npm errs.Can any one help me on this.

What I have tried:

I have checked in the ps.1 script with npm install command and passing in the pre-build script section of the process but it is firing at D:builds\2\projectname\buildname\src\ with npm err saying package.json is not found and some npm errs.Can any one help me on this.
npm install and npm run build are the commands i have kept in the script. Is i need any big change to be made to the script, as i'm not much aware of scripting.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900