GithubHelp home page GithubHelp logo

npm-package-cache's Introduction

NPM packages that I care about. Disclaimer: if you choose to use this project directly, packages may appear/disappear and/or history may be rewritten at any time.

Quick start

$ npm i -g npm-proxy-cache
$ git clone https://github.com/mvines/npm-package-cache.git
$ npm-proxy-cache -f -s npm-package-cache --ttl 307584000 --expired --port 4242
$ npm config set https-proxy http://localhost:4242/
$ npm config set proxy http://localhost:4242/
$ npm config set strict-ssl false
$ export DISABLE_NODE_MODULES_CACHE=1

Refresh

$ cd npm-package-cache
$ git pull --rebase

Caveats

If the npm-proxy-cache daemon isn't running (for example, it randomly crashed in the background and you didn't notice), then npm install will fail with a message like

npm ERR! failed to fetch from registry: https://registry.npmjs.org/babel-preset-es2015

Since there's a wide universe of causes that can lead to npm install to fail, you should add the cache daemon to the list since it's easy to check.

When a new package version is published, you need to manually go into the cache and erase the metadata so that npm will fetch from the upstream registry. Imagine the new version of left-pad is published and you want it, you need to manually do this:

$ ls -l npm-package-cache/l/e/f/left-pad
-rw-rw-r-- 1 mvines 4920 Feb 16 21:30 npm-package-cache/l/e/f/left-pad
-rw-rw-r-- 1 mvines  664 Feb 16 21:30 npm-package-cache/l/e/f/left-pad-0.0.3.tgz
$ rm /ws/npmcache/l/e/f/left-pad

npm-package-cache's People

Contributors

joneschrisg avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.