Install node extensions without commands

I do internships at the company.
I need to create a node server.
I installed node on a computer (Windows), and I have to install some plugins, for example:
    - nodejs-webpack
    - colors
    - uglify

Usually I need to enter the command: npm install "theModule"
But the software cannot access the Internet (due to company restrictions), and the support service cannot authorize the software (or does not want to).

Can I install modules in any other way? (for example, downloading from Google and slide archives in the correct folder).


If the answer is no, do you know how I can get around this security?
+4
source share
3 answers

You need a private npm repository.

Check this answer:

can you host a private repository for your organization for use with npm?

+5
source

I found this!

For example, we will install "nodejs-websocket":
1) You just need to download here .
2) Put the files in the Node directory (for me it is "C: \ Program Files \ nodejs \ node_modules \ npm \ node_modules")
3) in your .js file just add this line: var ws = require("C:/Program Files/nodejs/node_modules/npm/node_modules/nodejs-websocket/")

Done! Thanks for everyone: D

+2
source

, , .

npm install package-name npm node_modules , . , C:\code\my-app, cd npm install package-name. node_modules C:\code\my-app\node_modules, . package-name C:\code\my-app\node_modules\package-name.

node_modules , , .

var ws = require('nodejs-websocket');

, , - node_modules. npm , npm install -g package-name. node_modules npm. , , , , . :

npm install -g bower

"bower" npm. Bower . :

bower install angularjs

, , . , require, , , node_modules , , .


: , .

npm install package-name, package.json . , npm install package-name --save, npm package-name package.json. package.json, "" , , package-name.

, , package.json, node_modules, npm install , npm , app package.json. , . - .

, package.json, - node_modules. , , , npm package.json , npm init. , package.json . node_modules, , - , package.json. - , package.json, : D

package.json , , node_modules . node_modules .gitignore, package.json. , , , , npm install . , node_modules , npm .

0

Source: https://habr.com/ru/post/1583743/


All Articles