简体   繁体   English

“myproject”报告了一个严重错误:找不到模块“express”

[英]“myproject” reported a critical error: Cannot find module 'express'

I have an error when deploying my project to Azure Microsoft.将我的项目部署到 Azure Microsoft 时出现错误。 I always get "myproject" reported a critical error: Cannot find module 'express'我总是收到"myproject" reported a critical error: Cannot find module 'express'

And I don't know how to install dependencies in azure or I don't know what happens而且我不知道如何在 azure 中安装依赖项或者我不知道会发生什么

But on my PC localhost works fine但在我的 PC 本地主机上工作正常

I am making a page with websocket (socket.io and express)我正在使用 websocket(socket.io 和 express)创建一个页面

Here are two things you might know:以下是您可能知道的两件事:

  1. If you run your node project on Windows environment, then you need the web.config file for IIS to recognize your project, which is not necessary for Linux environment. If you run your node project on Windows environment, then you need the web.config file for IIS to recognize your project, which is not necessary for Linux environment.

  2. When deploying our project, we just deploy the file after debugging, so set SCM_DO_BUILD_DURING_DEPLOYMENT=true or deploy the project after debug locally.在部署我们的项目时,我们只是在调试后部署文件,所以设置SCM_DO_BUILD_DURING_DEPLOYMENT=true或者在本地部署调试后的项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM