Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I Need "node_modules" Folder on Live Server

Tags:

node.js

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 node_modules folder within my project folder and I'm wondering if I need to upload the node_modules folder to my live server or not?

like image 774
Duggy G Avatar asked Oct 31 '22 15:10

Duggy G


1 Answers

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
like image 183
Luis González Avatar answered Nov 15 '22 06:11

Luis González