Tools assume `lerna` is installed globally
See original GitHub issueDevelopers who don’t have lerna
installed globally (i.e., via npm install --global lerna
) are going to encounter errors with the build scripts:
exec: lerna: not found
One should be able to wrap most lerna
invocations in scripts such as buildup
and builddown
with npx
in order to resolve at least that issue, but overall, the directions in CONTRIBUTING should be reviewed to ensure the steps all work without any globally-installed npm packages.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Lerna NPM
Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and ... Let's start by installing Lerna globally with...
Read more >Setting up a monorepo with Lerna for a TypeScript project
Lerna is a popular and widely used tool written in JavaScript for setting and ... With this done, install Lerna as a global...
Read more >Create a monorepo with Lerna | by Damian Cyrus
To use the lerna init command, you must first install the CLI globally or use npx. We will use the global installed CLI....
Read more >@lerna/global-options | Yarn - Package Manager
readme. Important note: this project recently changed stewardship to Nrwl! Your favorite tool is alive and well: https://blog.
Read more >Untitled
```sh $ npm install --global lerna ``` Next we'll create a new ... Lerna assumes the repo has already been initialized with `git...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess the larger issue is around being able to use the versions of
lerna
and other tools from the npm dependencies as specified in the projectpackage.json
. It would be safe to usenpx lerna
and safer to replace occurrences ofexport PATH=node_modules/.bin:$PATH
withexport PATH=$(npm bin):$PATH
(or add where not present) and then use thelerna
(and others) as is since these binaries would be available in the path.Am not sure this fixes the problem. Running the
./install.sh
script no longer depends on havinglerna
installed globally but when running../../../scripts/buildup
in the package dir it complains thatlerna: not found
.Taking a look at the
node_modules/.bin
dir at the project root level I see thelerna
symlink exists whereas in the package dir the subfoldernode_modules/.bin
does not contain thelerna
symlink.Fix 1338 only adds the
node_modules/.bin
to PATH but iflerna
is not installed then it will still not work. Perhaps the buildup script needs to also add../../../node_modules/.bin
to the PATH as it is the only place wherelerna
is installed