Questions tagged [lerna]

Lerna is a tool designed to help develop JavaScript projects in a single git repo containing multiple related npm packages.

The two primary commands in Lerna are lerna bootstrap and lerna publish.

bootstrap will link dependencies in the repo together. publish will help publish any updated packages.

Related links:

644 questions
0
votes
0 answers

Resource file missing in TypeScript package

I have a Lerna project containing two Typescript packages A and B. The tsconfig.json for both packages is: { "compilerOptions": { "module": "commonjs", "target": "es6", "esModuleInterop": true, "noImplicitAny": false, …
Boon
  • 1,073
  • 1
  • 16
  • 42
0
votes
1 answer

How to compile ts files into js into particular directories

I trying to compile typescript files with tsc command and use and lernajs to manage multi-package repositories. My directory structure is as…
SlawomirG
  • 1
  • 1
0
votes
0 answers

npm update only changed dependencies of a dependency

Is there a way to update dependencies of a dependency A (without reinstalling the dependency A package)? I'm trying to create a faster workflow and have a script that copies over all of the dist/ folder and package.json file of some packages I'm…
goofiw
  • 607
  • 5
  • 16
0
votes
1 answer

managing multiple js projects in a yarn/lena monorepo

I have a yarn workspaces monorepo that looks a bit like this: root |_dependency1 |_dependency2 |_api |_graphql |_frontend I am using yarn workspaces which is great but are there any tools about managing starting services etc. For…
dagda1
  • 26,856
  • 59
  • 237
  • 450
0
votes
1 answer

How to set the scope flag in lerna exec?

I'm trying to run a script in lerna that would execute on all components within a specific folder. So I'm trying to run something like lerna --scope src/subfolder/subfolder exec -- npm run myScript But I get this error: Error: No packages found…
HTB
  • 413
  • 1
  • 9
  • 22
0
votes
0 answers

How to create typescript monorepo which ts file would be consuming between packages directly

I want to create lerna monorepo which includes a few packages. But i don't want to compile every package with tsc. This means that i want to export tsx-ts files directly in package.json files' "main" section. And consume these ts files directly from…
mehmet baran
  • 636
  • 8
  • 18
0
votes
2 answers

Install dependencies using lerna fails

I am trying to add a module as dev-dependency from npm to one of several modules I have in my lerna repo, but when doing that neither is the module added to only one of my modules, nor is it added as a dev-dependency. Instead it is added to all of…
Socrates
  • 8,724
  • 25
  • 66
  • 113
0
votes
0 answers

Webpack HMR: Does not watch changes to external packages in /node_modules

I have a project on React + Webpack 2. Since recently, there was a need to divide the project into modules. I decided to use Monorepo with Lerna. But I have caused a lot of problems. One of the main problem is that the changes that I make to the…
-1
votes
1 answer

Prevent Lerna from making breaking version updates

I am looking for a way to restrict Lerna from major version updates during CI, as they will likely create dependency issues. My intuition is to write an npm lifecycle script that executes upon version event. Still, I need clarification on what…
Maxim Kirilov
  • 2,639
  • 24
  • 49
-1
votes
1 answer

Heroku not installing certain Node modules

I'm trying deploy a Lerna app on Heroku, but the platform isn't installing the actual Lerna package in the node_modules no matter what I do. I've gotten to the point where I have accessed the app files directly and tried running npm install…
-1
votes
1 answer

Having a error lerna success run No packages found with the lifecycle script 'typecheck'

I have a problem with starting lerna. I get an error 'lerna success run No packages found with the lifecycle script 'typecheck'. How I can fix it? My package.json { "name": "test-web", "private": true, "scripts": { "typecheck": "lerna run…
Temniy
  • 53
  • 2
  • 10
-2
votes
1 answer

After lerna can support monorepo, what are the advantages of Rush?

I have checked a lot of data. Perhaps due to the timeliness, the advantage of Rush is to support pnpm. But in fact, lerna can also support pnpm: https://lerna.js.org/docs/recipes/using-pnpm-with-lerna Because lerna was released earlier, it has a…
Riddle
  • 51
  • 1
  • 8
-2
votes
2 answers

'npm run test' works, but 'jest --coverage' command does not work

I have MonoRepo project (using Lerna) which consists of multiple packages, and one of them is a React application. Within the React project package, I utilise Jest for unit testing. However, when I run the jest --coverage command on the WebStorm…
wentjun
  • 40,384
  • 10
  • 95
  • 107
-2
votes
1 answer

Bash substitution within lerna exec not working

I have this command that prints out all the folder names of all the packages within a lerna project. lerna exec -- node -e 'console.log(path.basename(process.cwd()))' I have this command that should replace the name of every lerna package's name…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
1 2 3
42
43