GithubHelp home page GithubHelp logo

option to for .store location about pnpm HOT 10 CLOSED

pnpm avatar pnpm commented on May 18, 2024
option to for .store location

from pnpm.

Comments (10)

rstacruz avatar rstacruz commented on May 18, 2024 1

i got better use cases for you:

  1. keep the store in ~/.pnpm/node-4/store/ so that Babel doesn't take up 100MB for every project I have
  2. since the 'global' store is prepended by the node major version, I can switch node versions and switch my compiled modules out by symlinks

this is actually the very reason I put pnpm together! I'm still contemplating on how to best do this, whether it's to symlink ~/.pnpm/node-4/store/[email protected] -> ~/project/node_modules/.store/[email protected] -> ~/project/node_modules/lodash, or to skip the 2nd symlink entirely. Both have their pros and cons and I'm waiting to use pnpm for a while to get a feel of which would be the better approach. πŸ‘

from pnpm.

gtramontina avatar gtramontina commented on May 18, 2024

Ooh! I like where this is going! 🍻

from pnpm.

jkroso avatar jkroso commented on May 18, 2024

@rstacruz what's the potential benefit of the extra symlink?

PS: the symlink approach is great in general since It saves tons of rm -rf node_modules && npm i though you will run into problems with babel and plugin-ish modules since people rely on the implementation details of npm occasionally. So expect to do a bit of hackery.

from pnpm.

rstacruz avatar rstacruz commented on May 18, 2024

jkroso: easier to account for what packages may (or may not) be in use. what if you stop using a dependency in one of your projects... how do we keep track that no project needs it anymore?

from pnpm.

rstacruz avatar rstacruz commented on May 18, 2024

okay there's a super secret flag that lets you do this:

npm config set pnpm_store_path node_modules/.store  # <- default

not documenting it though, it's easy to screw this up if you don't know what you're doing

from pnpm.

kevinverelst avatar kevinverelst commented on May 18, 2024

Setting this flag does not seem to work for me, the packages are still stored in node_modules/.store.
Ideas are welcome

from pnpm.

kevinverelst avatar kevinverelst commented on May 18, 2024

Nvm, the flag is renamed to store_path it seems

from pnpm.

zkochan avatar zkochan commented on May 18, 2024

hey, I documented the usage of a shared store: https://github.com/rstacruz/pnpm/blob/master/docs/recipes/shared-store.md

from pnpm.

kevinverelst avatar kevinverelst commented on May 18, 2024

Great! Thanks

from pnpm.

dandv avatar dandv commented on May 18, 2024

The link to the pnpm shared store is now dead. Pointing to that other issue for SEO.

from pnpm.

Related Issues (20)

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.