简体   繁体   中英

Do I Need “node_modules” Folder on Live Server

这可能是一个愚蠢的问题,但我已经在我的计算机上安装了节点并且一直在运行创建我的sass的任务,这意味着我的项目文件夹中有一个node_modules文件夹,我想知道是否需要将node_modules文件夹上传到我的live服务器与否?

如果要在服务器上运行node.js项目,则应确保服务器已安装node.js,并且可以使用“npm install”来安装package.json的模块。

Tipically you must:

  • To have installed Node.js in the server (and npm).
  • You generate packaje.json in local. npm init . You execute this in a folder containing node_modules.
  • When package.json is generated. You upload it to the server.
  • When package.json is in the server, specifically in your project folder, you install all dependencies with npm install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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