M
M
maxsnw2017-10-31 14:05:25
JavaScript
maxsnw, 2017-10-31 14:05:25

Installing and using gulp locally and other Npm packages?

Good afternoon.
There was such problem: the worker's computer is cut off from the Internet, but during the work it would be desirable to use galp and other packages. Nodejs is installed, I pulled the node_modules folder at home, after downloading the necessary packages. So, is it possible to somehow specify on the command line that he would execute npm install from the local folder, in which the packages already lie directly without accessing the network (as far as I understand, directly from the Node_modules folder)?
jason looks like this:

{
  "name": "testgulp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",

  "dependencies": {
    "browser-sync": "^2.18.13",
    "gulp-autoprefixer": "^4.0.0",
    "gulp": "^3.10.10",
    "gulp-imagemin": "^3.4.0",
    "gulp-minify-css": "^1.2.4",
    "gulp-rigger": "^0.5.8",
    "gulp-sass": "^3.1.0",
    "gulp-scss": "^1.4.0",
    "gulp-sourcemaps": "^2.6.1",
    "gulp-uglify": "^3.0.0",
    "imagemin-pngquant": "^5.0.1"

  }
}

If I just run a build, it says "gulp is not recognized as an internal or external
command, operable program, or batch file."
npm gulp -v gives the version, but it fails to use gulp, the error presented above crashes. I use in the root folder of the project.
In short, I need to be able to just store the assembly and, if possible, immediately install everything from a local folder and get to work, without accessing the network.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
NichitencoEvgh, 2017-10-31
@NichitencoEvgh

local-npm will solve your problem: https://www.npmjs.com/package/local-npm

F
Froggyweb, 2017-10-31
@Froggyweb

There is such a thing for Windows schinagl.priv.at/nt/hardlinkshellext/linkshellexte...
I make a symbolic link to the node_module folder and throw it into a new project. Everything is working. Naturally, those modules that are installed in the source code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question