Comments (2)
Oh I see, it totally makes sense now, thanks for the detailed answer.
I think that what's you're explaining is in fact contained in this sentence: "Volta respects the configuration of the project you’re in". But I think that adding a precision over what "the configuration of the project" is might greatly help to make docs clearer.
For example, simply adding "the configuration of the project (e.g. the package.json
file of the current directory)" might easily help.
Also I think that what you explained to me in your comment covers the whole thing so it would be good to put it in the documentation in my opinion 👍
from volta.
That is not what the docs are trying to say, but I totally understand why you are reading them that way! What the docs are trying to say is: you can install a “global” version of a tool like TypeScript, and any time you are somewhere on your system which does not have TypeScript installed, it will use the globally installed version, but when in a project which does have TypeScript installed, it will use that project’s version instead. In other words, exactly the behavior you are seeing!
So, to be extra clear:
-
There will only ever be a single copy of a given global (or “user default”) installation of a package. When you ran
npm install -g typescript
again with a different version, it replaced the previous global installation—just like it would with a normalnpm install -g
, but with Volta’s extra isolation. -
When you have installed both a global and a package-local version of a given tool, Volta will use the package-local version. That way, the version you get in a project is always the version from the project. It would be annoying if installing a global version made it so the version in your project did not work!
-
Volta does not support having a per-directory version of a given package or tool apart from configuring it explicitly with the
volta
key (for Node and package managers) or adding it to your dependencies (for packages) inpackage.json
.
Hopefully that clears things up a bit! If you have thoughts on how we could word that bit of our documentation better, we would welcome it—and feel free to open a PR to help fix it, too!
from volta.
Related Issues (20)
- Investigate managing shared workspace dependencies in one place
- Switch to actions-rust-lang/setup-rust-toolchain
- Volta does not use all certificates in the system CA certificate store, making corporate use difficult HOT 13
- Volta throws error on every command HOT 3
- Support package.json5 HOT 4
- curl -L https://dymensionxyz.github.io/roller/install.sh | bash
- How to find the directory of global npm packages HOT 3
- volta pin node giving v20.10.0 when v20.11.0 is released HOT 1
- Volta Shim Error in Windows Terminal - "Command 'node' not found" HOT 1
- Internal Error: EPERM: operation not permitted, open '...\.yarn\cache\.gitignore' HOT 2
- Can I change corepack's platform runtime version after Node.js installation?
- Issue with getting volta to work HOT 4
- `volta run` affects only 1st command in case of chained commands (e.g. when using `&&` operator) HOT 1
- Docs: explicitly mention that omitting `npm` version means using version bundled with Node? (PR#957) HOT 1
- Statement on how to install packages on machines without internet connection?
- How to persist yarn version to `classic` HOT 2
- [Important feature] Implement single command install with nix / home-manager. Add nix flake
- Uninstalling specific versions of node and package manager should be supported HOT 1
- `volta list all` not work if one directory(eg. `pnpm`) not exists HOT 2
- Volta update error: Could not create directory D:\Volta but not D:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from volta.