-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need RFC for npm/yarn link between projects with conflicting node versions #56
Comments
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. |
the IMO, the feature of notion to automatically switch to the version in the current project, implies it should also "do the right thing" when |
I believe making 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 |
See also #657 for an additional use-case of |
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? |
@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 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 |
I like Would it work to just check ...anyway, i think having that under control across platform would be an amazing goal for volta :-) |
We definitely want to have a story for 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. |
With #888, we now have real support for |
How should notion behave for the
npm link
usecase?Imagine project A uses node@6 and project B uses node@8 with project B depending on A
The workflow used would be:
cd projectA
npm link
to make it globally availablecd projectB
npm link projectA
to link it up.The npm versions used in 2 and 4 are different and will cause B not to find A
The text was updated successfully, but these errors were encountered: