I've got a website project in Visual Studio based on the MVC5 project template and published it successfully to Azure continuously.
Since I moved my TFVC workspace from one drive (C:) to another and (Z:) by creating a new workspace and getting latest from source control I got publishing issues:
module.js:327
at node.js:999:3
The 'prepublish' script failed with status code 1.
at Function.Module._load (module.js:276:25)
^
at Function.Module.runMain (module.js:429:10)
at startup (node.js:139:18)
throw err;
at Function.Module._resolveFilename (module.js:325:15)
Cannot find module 'Z:...Website\node_modules\gulp\bin\gulp.js'
My prepublish commands in the project.json file:
"prepublish": [ "npm install", "bower install", "gulp clean", "gulp min" ]
After hours of updating extensions and packages, and running npm commands, I'm lost. Any hint to solve this issue would be appreciated.
I followed this SO question Node.js error in Azure build and changed my prepublish command to this:
"prepublish": [ "npm install", "bower install" ]
That allowed me to publish again, but I'd like to run the gulp commands before publishing.