Duggy G Duggy G - 1 year ago 65
Node.js Question

Do I Need "node_modules" Folder on Live Server

This may be a silly question but I have installed node on my computer and have been running tasks for creating my sass which means I have a

folder within my project folder and I'm wondering if I need to upload the
folder to my live server or not?

Answer Source

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