I
I
ivandao2019-09-23 09:50:48
Node.js
ivandao, 2019-09-23 09:50:48

How to run the utility manually?

How to run a utility like nodemon , pm2 , forever manually (not like this: nodemon app.js)? And something like this: node nodemon.js app.js
This need is caused by the fact that the utility is not installed in npm (due to the fact that the computer is not connected to the Internet and I carry packages to it manually)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sergey, 2019-09-23
@dev_random

option 1:
- git clone {nodemon,pm2,forever}
- see how the run files are defined in package.json:
https://github.com/Unitech/pm2/blob/master/package...
https://github .com/remy/nodemon/blob/master/packag...
- drag the cloned git repo on the flash drive and try to run it the same way as in package.json
option 2:
- git clone {nodemon,pm2,forever}
- add bundledDependencies in package.json ()
- npm pack
All we have is a *.tgz file that can be installed (npm install ...) even without internet
option 3:
If it is possible to bring your own laptop, then we raise our npm mirror / cache on it. I once used sinopia for this a long time ago. There must be newer alternatives

A
abberati, 2019-09-23
@abberati

There is a npm link command that can link a package from the file system to npm. What you need. After linking, it will work as if it was installed from the Internet.
https://docs.npmjs.com/cli/link

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question