I am trying to deploy my node.js app on Azure webapp via bitbucket.
when I checked the the wwwroot folder on kudu console, I could not find any node_modules folder and hence the app failed to start
I have tried both npm install and npm install --production in kudu console (inside the wwwroot folder), and I could see the node_modules and files being install via filezilla.... however when I try to start the app again, the node_modules just disappears, can't see it neither in kudu console nor in filezilla.
the package.json file in the project folder:
{
"name": "fo",
"version": "1.0.0",
"description": "xx xx xx",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "xx xx",
"license": "MIT",
"dependencies": {
"angular-map-it": "0.0.20",
"angular-maps": "^6.0.1",
"angular-waypoints": "^2.0.0",
"axios": "^0.19.0",
"bcrypt": "^3.0.6",
"bluebird": "^3.5.5",
"body-parser": "^1.19.0",
"connect-mongodb-session": "^2.2.0",
"convert-json": "^0.5.0",
"csvtojson": "^2.0.10",
"dotenv": "^8.0.0",
"express": "^4.17.1",
"express-session": "^1.16.2",
"fixed-width-string": "^1.0.0",
"guid": "0.0.12",
"json2csv": "^4.5.2",
"jsontoxml": "^1.0.1",
"moment": "^2.24.0",
"moment-business-days": "^1.1.3",
"money": "^0.2.0",
"mongoose": "^5.6.4",
"multer": "^1.4.1",
"ng-storage": "^0.3.2",
"node-crisp-api": "^1.8.3",
"nodemailer": "^6.3.0",
"objects-to-csv": "^1.0.1",
"open-exchange-rates": "^0.3.0",
"sanitize": "^2.1.0",
"svg-assets-cache": "^1.1.3"
}
}
I don't understand, how people make node.js app work on azure? why node_modules is disappearing? and why azure is not automatically installing them based on my package.json??