-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Feature] Using Lerna Locally #138
Comments
I am wholeheartedly behind running locally but in the way all other modules currently work instead of any tricks with 'usr/bin'. Personally, I dislike -g with anything node and avoid preferring anything global. I don't use |
I want to encourage as many people to install locally as possible. I wouldn't mind having a separate |
@thejameskyle babel-cli also |
babel-cli doesn't resolve to the local version if you have one installed, it depends on babel-core itself |
All you have to do is add Here's how to add it to your path in your dot files PATH=./node_modules/.bin:$PATH # adds locally installed node modules to the path
export PATH You can also make an function for it if you don't like messing with the path function npm-exec {
$(npm bin)/$@
} If you're using a PATH := $(npm bin):$(PATH)
SHELL := /bin/bash So the following would work bootstrap:
lerna bootstrap I don't use windows but I asked a co worker who does to look into it. So I will update this if he comes up with anything. |
I don't want people messing around with there bash config |
|
closes lerna#138 BREAKING CHANGE lerna now prefers installs resolvable relative to the current working directory. For situations where a global install was used and an outdated lerna version is present in the node_modules folder, this might cause breakage. The issue can be resolved by installing a lerna version that fulfills the version requirement in lerna.json
Don't know if it will help but you can not have it installed globally:
Any arg after |
I like to avoid adding global npm packages if I can, and could only find this issue on the topic: lerna#138 The solution provided is clean, simple, and effective. Since we already have a tip for CI setup, I thought it made sense to also include a small snippet about local usage. This simple (1 line change) change to package.json is all it takes to accomplish this.
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I want to encourage people to run lerna locally, but it's kinda annoying using a CLI based tool with tons of commands locally (you end up aliasing all of them to npm scripts or something else and no gross)
So instead I want to make it so that the global
/usr/bin/lerna
will run the local./node_modules/.bin/lerna
if it exists.It'd be nice if this could work independently of versioning, so any version of the global CLI can run any version of the local CLI.
I'm considering just making this another package
lerna-global
that is super dumb: (pseudo code)The text was updated successfully, but these errors were encountered: