local-npm | Local and offline-first npm mirror | Runtime Evironment library
kandi X-RAY | local-npm Summary
kandi X-RAY | local-npm Summary
local-npm acts as a proxy between you and the main npm registry. You run npm install commands like normal, but under the hood, all requests are sent through the local server. When you first npm install a module, it'll be fetched from the main npm registry. After that, the module and all its dependencies (at that version) are stored in a local database, so you can expect subsequent installs to be much faster. The server will also listen for changes from the remote registry, so you can expect updates to a module's metadata to be replicated within seconds of being published. (I.e. you won't get stuck with old versions.). If you're organizing a conference/meetup/whatever, you can also share this local server with multiple people. So if your teammates are constantly installing the same modules over and over again, this can save a lot of time in the long run. local-npm is also a good way to make npm install work offline. Assuming new versions of a package haven't been published since you last installed, subsequent npm installs will all serve from the cache, without ever hitting a remote server. Addy Osmani has a nice post comparing local-npm to other options.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Search for a meta version .
- get the level
- Error handler for port
- Logging functionality
- Sync console synchronous
- Handle code .
- Log info message
- Manages a certain number of arguments
- check for all callbacks
- Log request .
local-npm Key Features
local-npm Examples and Code Snippets
Community Discussions
Trending Discussions on local-npm
QUESTION
I have been told here that I could locally add globally installed packages using local-npm
I am aware that this is not a good practice, but as I may be forced to work offline for a few weeks I am desperate to get this set up so I do not face issues if I need any of my most commonly used packages.
I have already installed all the packages that I will need for the following weeks globally and I am now trying to understand how to use local-npm
.
Am talking about front-end packages for me to use with react
, such as redux
, react-router
, etc.
I have understood that I need to first:
- install
local-npm
globally (done) - run
npm-local
in my project (the terminal does not recognize this command) I have also triedlocal-npm run start
with no success anyways. - set the registry to
npm set registry http://127.0.0.1:5080
- then install whatever a want
npm intall redux-thunk
, for instance.
I am surely doing something wrong.
After a set the registry, turn the wiFi off and try to install npm install
in my project nothing happens.
THanks and sorry for the dumb question as I am still a beginner to npm
and still going to start the back-end
journey.
P.S - I have read the Local-npm docs so please don't answer just pointing me there, but please give me a demo
example, or something alike.
ANSWER
Answered 2020-May-23 at 03:41I know this is an entirely separate technology, but I'd like to suggest that you try out pnpm. https://pnpm.js.org. It's essentially a drop in replacement for npm.
Pnpm works by caching your installs to one central location and then creating symlinks to that location to the node_modules folder.
Pnpm will allow you to work offline, provide very fast installs (as it's just a symlink), and you don't need to pollute your global installs.
https://pnpm.js.org/en/cli/install there's an option for installing fully offline once the modules are cached: pnpm i --offline
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install local-npm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page