简体   繁体   English

React项目的远程服务器上是否需要node_modules目录?

[英]Is node_modules directory required on a remote server for React project?

I an running a react project locally. 我在本地运行一个React项目。 I want to now run from a remote server, is the node_modules directory necessary to have on the server? 我现在想从远程服务器上运行,服务器上是否必须有node_modules目录?

If there are dependencies with particular node modules, of course, yes. 如果特定节点模块之间存在依赖关系,当然可以。 Try to remove the folder and run your app. 尝试删除文件夹并运行您的应用程序。 If there are errors, try to 'npm install' and run again. 如果有错误,请尝试“ npm install”并再次运行。 If it works, you need to include node modules folder. 如果可行,则需要包括节点模块文件夹。

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

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