Comments (9)
See also #657 for an additional use-case of npm link
that we should support (or explicitly document that we don't support).
from volta.
I know that nvm, in this scenario, offers no solution β projects must be using the same version of Node in order to link them in this manner.
from volta.
the engines
stanza of package.json supplies enough information for a tool to make this work automatically. For the example above, if Project A
states use node:6
but also states it supports >4 <=8
and if Project B
states use node: 8
, notion could magically call npm link
using node 8.
IMO, the feature of notion to automatically switch to the version in the current project, implies it should also "do the right thing" when npm link
ing.
from volta.
I believe making npm link
cross node versions work transparently may want to be outside of the scope of notion
. As this behavior is npm
/ yarn
specific, and important for several reasons. such as to avoid linking across incompatible ABI's (an issue when dealing with native dependencies).
My preference handle this scenario would be to add a CLI option to notion which overrides the ambient configuration for the current session/command, in an ephemeral way.
Some potential 1-off commands:
// in projectA
notion set node@8 // only updates ENV vars, notion, to disk
// or
notion set --save node@8 // updates env vars
// or
notion run node@8 -S npm link
from volta.
in #657 i tried to think about a solution.
if you maintain a list of all linked modules, wouldn't it be possible to update all symlinks whenever node versions switch?
from volta.
@serapath The issue is that Volta doesn't necessarily know about node version switches. For instance, if a project has its version changed as part of a git pull
operation, we wouldn't be aware of that until the first command was run. Or changing directories between projects that are pinned with different versions.
It's something we could potentially look for, but we would need to evaluate whether the benefits were worth the additional checks that would be needed on every execution
from volta.
I like volta
because it allows me to install and manage node
versions across platform.
How many ways exist to switch node?
Doesn't volta
anyway check every time a directory changes?
Would it work to just check which node
and watch it?
Either that file changes or when directories change, maybe the which node
shows a different target
...anyway, i think having that under control across platform would be an amazing goal for volta :-)
from volta.
We definitely want to have a story for link
that works across different platforms, as much as possible.
Volta doesnβt actively track / watch anything, instead the way it remains context-aware is that it sets up shims for each of the tools and evaluates the correct node version on each execution.
from volta.
With #888, we now have real support for npm link
, including making bin
tools available when you link a local project. For the case of cross-node versions, when we have all the information to detect the issue, we show a warning to the user letting them know that the versions don't match and things may not interact as expected.
from volta.
Related Issues (20)
- Proposal: Integrate NSolid or custom node runtimes as an Alternative to Node List in Volta-CLI HOT 1
- Node and npm are not found in VSCodium's task terminal HOT 6
- Volta does not switch global packages on directory change HOT 2
- pnpm workspace not work HOT 2
- Could not find the sentinel NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 in the binary HOT 5
- Uninstalling node is not supported yet. HOT 1
- Volta npm shim ignores the --dry-run flag HOT 3
- Upgrade to latest version of Clap HOT 6
- Upgrade to latest version of zip
- "command not found: yarn" HOT 1
- 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
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.