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)
- Volta update error: Could not create directory D:\Volta but not D:
- Installing package's man pages globally HOT 5
- Generate Volta man pages
- Running Node with Volta with TMP options HOT 5
- 关于文件路径问题 (Specify installation path)
- Volta/Nuxt problems between multiple user accounts? HOT 2
- SUGGESTION: Move volta config to .voltarc or somewhere else. HOT 1
- I am install [email protected] ,but platform runtime at [email protected],why HOT 1
- volta install cocoapods HOT 2
- Unable to install TypeScript: Could not create shared environment for package 'typescript' HOT 1
- Potential fork bomb
- how to solve pnpm's problem HOT 3
- When trying to install new versions volta hangs indefinitely and uses all available network bandwidth HOT 7
- Unable to install nativescript (CLI)
- When using child_process.fork() with the execPath pointing to volta on windows ipc breaks. HOT 1
- Volta changed the toolchain action HOT 1
- mkgainet.
- uninstall failed
- Can I use it on a prodcution server with pm2? HOT 1
- [PSA] yarn version discrepancy
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.