[英]After deploying to Azure Web apps, some modules are not automatically installed
After deploying to Azure Web apps, some modules are not automatically installed. 部署到Azure Web应用程序后,不会自动安装某些模块。
After deploying, the following error is output. 部署后,将输出以下错误。
Error: Can not find module 'Cookie-parser'
At that time, I run 'npm install cookie-parser --save'. 当时,我运行“ npm install cookie-parser --save”。
In the package.json, the dependencies of the cookie-parser is surely saved. 在package.json中,肯定会保存cookie解析器的依赖项。
{
"name": "solo",
"description": "demo",
"version": "0.0.1",
"private": true,
"license": "MIT",
"author": "lostsupervisor",
"engines": {
"node": ">=6.9.1"
},
"dependencies": {
"body-parser": "^1.17.2",
"cookie-parser": "^1.4.3",
"ejs": "^2.5.6",
"express": "^4.15.4",
"express-session": "^1.15.4",
"mssql": "^4.0.4",
"tedious": "^2.0.0"
},
"scripts": {
"start": "node index.js"
}
}
However, the same event occur after deploying next time. 但是,下一次部署后,会发生同一事件。
Could you teach me a solution? 你能教我一个解决方案吗?
You are using Cookie-parser
which is wrong. 您正在使用Cookie-parser
,这是错误的。
In NPM modules while downloading npm upper and lower cases matter. 在NPM模块,而不管下载NPM 大小写 。 Change it to cookie-parser
, upper C
is causing the problem. 将其更改为cookie-parser
,上面的C
引起了问题。
It was caused by package-lock.json being not being pushed. 这是由于未推送package-lock.json引起的。 I solved it by pushing it. 我通过推动解决了它。 Thank you very much. 非常感谢你。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.