Questions tagged [lerna]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

How to share context between Lerna packages with React and @tanstack/react-query?

In my monorepo built with Lerna, I have two packages: app and components General information The app package is a clean install of a Remix Run app. The components package is a simple component library ...
Kevin Vugts's user avatar
  • 1,454
0 votes
0 answers
10 views

Debug linked modules using WebStorm

I'm attempting to debug a Next.js project within a Lerna monorepo using WebStorm. Currently, WebStorm doesn't halt at the source files, although it does stop at breakpoints within the code located in ...
Matías González's user avatar
0 votes
1 answer
16 views

How can I remove parent path when importing a package from same monorepo?

I have a nodejs project which uses nx to manage multiple packages, the structure is: packages/my-proj1/src/*.ts packages/my-proj2/src/*.ts ... the my-prod2 has dependency on my-proj1, so in the ...
Joey Yi Zhao's user avatar
  • 37.8k
0 votes
0 answers
14 views

Lerna is not rendering inquirer prompt properly

I am using lerna to handle the monorepo project structure. When I run below code const question = [{ type: 'input', name: 'permission', message: chalk.red(logMessages....
Amit Limbasiya's user avatar
0 votes
0 answers
13 views

Use RTK Query endpoints as a package in a lerna monorepo

I have Lerna Monorepo with an api folder inside of the packages folder. api folder is just RTKQuery endpoints which code split into several other folders as described in Code Splitting. I have two ...
Amir Rezvani's user avatar
  • 1,272
0 votes
0 answers
16 views

Forking a yarn workspace using lerna and publishing 2 packages under the company namespace

Given a repo using yarn workspace and lerna. This workspace have two packages main-pack and sub-pack. The main-pack does reference sub-pack. I want to fork it and publish a patch on npm under my ...
Philippe's user avatar
0 votes
0 answers
9 views

Create a file version.js when lerna release a new version

We use lerna for releasing npm packages. I would like to get the package version in the code. As I gone through some of the articles it is not good practice todo that. Also we use the same package in ...
Selvakumar Ponnusamy's user avatar
0 votes
1 answer
115 views

Lerna problem using conventional commits with an existing project

I've been manually managing my package versions and changelog.md file up to the 5.2.0. Now I'm trying to integrate Lerna to manage my package but facing an issue while doing that. Issue: lerna version ...
Ram Krishna Kumar's user avatar
0 votes
0 answers
69 views

Lerna return lerna success run No packages found with the lifecycle script 'build'

when i try to run lerna run build --stream it runs a long time and fails with lerna success run No packages found with the lifecycle script 'build'. The repository was up to date and i have 0 changes ...
Caychu's user avatar
  • 1
0 votes
0 answers
12 views

Lerna Jenkins setup

Setting up a Lerna mono-repo with a jenkins deploy file. Whats the general approach for deploying only packages that have changed? And how do I handle a scenario where specific packages might require ...
TrollBearPig's user avatar
0 votes
0 answers
29 views

Invalid package name "@orgname/@lib/selectors": name can only contain URL-friendly characters

When I publish (lerna publish from-package) library with lerna, I have error: name in package.json "@libName/selectors" does not match publish URL "@OrgName/@libName/selectors" If ...
645 546's user avatar
  • 11
0 votes
0 answers
26 views

Auto imports React hooks for Lerna monorepo

I have an monorepo that use Lerna, and i have 4 packages inside: Client Frontend Admin Frontend Components Reusable packages for Frontend I'm using React, and in reusable packages i have it as ...
Viktor Dzhyranov's user avatar
0 votes
0 answers
33 views

Lerna watch not detecting changes on oracle linux machine

We are having a mono repo react app and trying to integrate lerna into it. Environment details OS - Oracle Linux OS Node version - 16.8.1 React version - 17.0.1 Lerna version - 7.1.1 While running ...
Karthik's user avatar
0 votes
0 answers
65 views

In a monorepo, which dependencies should be peer dependencies rather than regular dependencies? And how to make yarn install peer deps in dev env?

I am working on upgrading a repository from an ancient version of Lerna to have a more modern build tooling, but it's something that I'm learning about as I go. Here's the repo. Now, the issue that I'...
danielhep's user avatar
  • 356
-1 votes
1 answer
34 views

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 ...
Maxim Kirilov's user avatar
0 votes
0 answers
11 views

Is there a way to get webpack to fail-fast? Lerna as well

I have a lerna bootstrap webpack 4 monorepo I'm trying to upgrade however I can. When trying to migrate to workspaces I'll often get failures in like 10 packages/workspaces and each one will have like ...
Novaterata's user avatar
  • 4,373
2 votes
0 answers
56 views

How to make a lerna monorepo build directly for production?

I have a fairly complex monorepo setup using learna. Imagine I have multiple packages "packages": [ "@myorg/package1", "@otherorg/package2", "@anotherorg/...
heapOverflow's user avatar
  • 1,205
0 votes
0 answers
153 views

npm Workspaces linking "dist" directory

Simplyfied I've got the following project structure: workspace/ ├─ package.json <-- With npm workspaces (see below) ├─ packages/ │ ├─ angular/ <-- Angular ...
nioe's user avatar
  • 756
0 votes
0 answers
32 views

lerna ERR! lifecycle "preinstall" errored in "xyz-ui" in Angular Project

I am getting this error on Jenkins build : lerna ERR! lifecycle "preinstall" errored in "xyz-ui", exiting 1 . I am using npx npm-force-resolutions in "preinstall" script ...
salman farsi's user avatar
0 votes
0 answers
10 views

Failed to install webpack with npm in a project managed by lerna

This is the relevant error message. $ npm install webpack --save npm ERR! While resolving: @h3/[email protected] npm ERR! Found: @h3/[email protected] npm ERR! node_modules/@h3/awesome-ui npm ERR! ...
gepengfei's user avatar
1 vote
0 answers
116 views

Patch-packages in sub packages didn`t work well when I use lerna to install all packages

I have one project which has one packages folder and it contains three subfolders. The three subfolders have their own package.json file. One of them has patch-package npm package and "...
tcguoxing's user avatar
1 vote
0 answers
33 views

Internal Lerna package import in VSCode on wsl gives typescript error

I am using WSL on Windows, and typescript in VSCode does not find imported internal modules, as in: import { Something } from "@namespace/package"; where namespace/package is in the same ...
Jeiger's user avatar
  • 11
0 votes
0 answers
108 views

Compiled lerna project is not resolving modules of a common library package

I have a project that I am using lerna and npm workspaces in. There is the root folder, where my lerna.json etc is. Then there is the packages folder. Inside the packages folder, there are 3 packages: ...
ThePerplexedOne's user avatar
2 votes
0 answers
204 views

SyntaxError: Cannot use import statement outside a module React native - typescript

This might be a duplicate question but have already tried few similar link solutions, but it did not work for my Monorepo(lerna architecture) project, getting below error. Every modules have their ...
Neelam Pursnani's user avatar
2 votes
1 answer
122 views

Is there a way to enforce local package dependencies in npm workspaces when publishing packages?

I am trying to use npm workspaces to be able to publish parts of my project as packages: ├── packages │ ├── package-1 │ │ └── package.json │ └── package-2 │ └── package.json ├── src │ └...
tdesero's user avatar
  • 181
0 votes
0 answers
555 views

nx is not invalidating the cache when TypeScript declaration files change in dependencies

I have a monorepo that uses Lerna with nx and PNPM workspaces. There are many packages that depend on each other. We use a custom build tool that uses TSC and Babel to type check and build our ...
wdc's user avatar
  • 1
0 votes
0 answers
33 views

Having trouble implementing react-redux in Lerna

I am using lerna to split my react project into modules, each one using a reduxjs-toolkit slice, here is an example of how it is structured - packages - users - lib - core - config - root -...
Kathar6's user avatar
  • 93
1 vote
0 answers
125 views

Jest not recognizing import statement in a Node.js and Lerna monorepo

I'm working on a Lerna monorepo project which includes multiple Node.js packages. Each package uses ES6 syntax, notably the import statement for modules. When I try to run Jest tests, I'm encountering ...
Ydonut13's user avatar
0 votes
0 answers
127 views

Error running `ng lint` in lerna monorepo for Angular package

Have a monorepo of component library packages for Angular, React, Svelte, and Vue. I am trying to setup the Angular 16 package in packages/angular to use eslint and prettier. When I run ng lint from ...
nstuyvesant's user avatar
  • 1,427
0 votes
1 answer
250 views

No matching version found for [email protected]

I'm working with a lerna project that uses npm and uncertain whether this is a lerna or npm issue. The structure of the project is like this - package.json (root) - package-lock.json - lerna.json - ...
lastoneisbearfood's user avatar
0 votes
0 answers
265 views

Using lerna to publish packages that use yarn workspaces

Same question asked here but using lerna publish and yarn workspaces instead of pnpm publish... Publishing five packages in a monorepo Using lerna fixed/locked mode for versioning. Version to be ...
nstuyvesant's user avatar
  • 1,427
1 vote
1 answer
152 views

Unable to to import modules from peer libraries in an Angular monorepo

Context We have a monorepo Angular UI component library and we are trying to introduce Lerna 6. The Problem Compilation failure trying to build one of the libraries which has a dependency on a peer ...
dapperwaterbuffalo's user avatar
0 votes
0 answers
82 views

Attach Debug with Lerna and nest.js

Scenario: I have created a lerna project with lerna init I have added a new package for backend application with nest.js added a dev script to the monorepo package.json so that will run the nest app, ...
tangir miah's user avatar
0 votes
0 answers
49 views

Webpack configuration with lerna and typescript

I have a fairly complex project with the following structure: bundles/ one/ webpack.config.js two/ webpack.config.js packages/ a/ src/ lib/ tsconfig.json b/ src/ ...
heapOverflow's user avatar
  • 1,205
0 votes
0 answers
144 views

yarn start command not working in monorepo

When I am trying to run yarn start it's showing: $ lerna run start --parallel lerna notice cli v6.6.1 lerna info versioning independent Failed to process the project graph with "index". This ...
Devesh Kumar Sharma's user avatar
0 votes
0 answers
24 views

Lerna and angular.JSON - should i reference styles in root

Im new to Lerna, I have a project where I have an angular project in packages When i bootstrap the project i see all the packages libraries get installed to the root lerna (is this normal) and in my ...
Kravitz's user avatar
  • 2,769
1 vote
0 answers
272 views

Lerna + npm packages - how do I run npm install of the build?

I've created a monorepo project with server/client/shared packages. I have an existing (large) project that I try to apply monorepo behavior to have common code between multiple projects. I'm using ...
Yoav Moran's user avatar
2 votes
0 answers
479 views

How to publish specific package in lerna using CICD configuration

I have a monorepo created in private registry. It is used by various developers for creating individual components inside packages folder. The CICD pipeline is setup to publish the packages once ...
Sudarshan's user avatar
0 votes
0 answers
33 views

Unable to "yarn install" for the Slate repository

I cloned the repository of Slate and opened it in WebStorm, but "yarn install" just goes wrong and no dependencies get installed. It's like this: IMAGE Maybe something's wrong with @octokit/...
oustr's user avatar
  • 1
0 votes
0 answers
207 views

When I try to import a shared module inside a single-spa, I get a "application 'application_name' died in status LOADING_SOURCE_CODE" error

Whenever I try to import a shared module inside a single-spa, I get the following error Uncaught Error: application 'application_name' died in status LOADING_SOURCE_CODE: Unable to resolve bare ...
Aynkaran I's user avatar
0 votes
1 answer
303 views

lerna run start --parallel on specified ports

Hello I am using lerna to manage my mono repo and to run cross app testing, I would like to start all my apps at the same time on multiple ports with one command. I have tried lerna run start --...
MoDark's user avatar
  • 1
0 votes
2 answers
361 views

Is it possible to ignore some files while running lerna watch?

I am developing a monorepo. Each package has a build command which compiles the code and outputs it to its ./dist folder. The problem I'm facing is that when I run lerna watch, it comes into a loop. ...
Alexis Leite Paracampo's user avatar
0 votes
0 answers
257 views

Lint staged broken for lerna: ERR! lerna Unknown arguments: [file paths]

Currently I am using [email protected]. I am having problems with lerna in lint-staged. I'm receiving a weird error: ERR! lerna Unknown arguments: and after that the path for all the committed files. ...
afriedman111's user avatar
  • 1,955
0 votes
0 answers
49 views

precommit broke after canceling out of a commit

I have a python app and angular app in my lerna monorepo. I have husky precommit hook (legacy) set up for the angular app as well as a python precommit hook. The precommit hook runs my command npm run ...
afriedman111's user avatar
  • 1,955
0 votes
0 answers
122 views

Why lerna publish command fails with 503 Service Unavailable?

Trying to execute script from package.json in folder Web "lerna publish --no-private --no-git-tag-version --no-push". Process fails with lerna ERR! E503 503 Service Unavailable - PUT. So it ...
Vera's user avatar
  • 51
4 votes
0 answers
350 views

Bundle Prisma Client in a module

I'm having questions, on prisma generated clients, maybe I'm doing things wrong. I Have a monorepo with the following modules dependency tree: Module A - |- Module C Module B - Module A ...
Quadear's user avatar
  • 467
2 votes
1 answer
1k views

Lerna publish fails says lerna ERR! EUNCOMMIT Working tree has uncommitted changes, please commit or remove the following changes before continuing

First things first, I am very much new to Lerna and it's the first time that I am asking a question here. I have been facing this error, when publishing the packages to our app registry. Publish error ...
Indira's user avatar
  • 21
3 votes
1 answer
818 views

What are the recommended ways to run typescript monorepos in dev environment?

For the last week, I have been refactoring a really big monolithic repository (npm/typescript) to a monorepo (yarn/lerna/typescript). The transition was quite easy in the beginning, I just refactored ...
stiMULAnt's user avatar
0 votes
0 answers
94 views

make lerna update package containing 2 versions

I have a requirement where we will have the depedency declared in the package.json as "sample-package" : "file:../../sample-package || 1.0.0" when we publish "sample-package&...
user1966409's user avatar
0 votes
0 answers
222 views

Lerna sync with latest version from registry

We have a monorepo setup (using lerna) to handle multiple packages. Now when some updates are made to certain packages, the version number are bumped up and published via a jenkins job that also ...
Shaleen Kachhara's user avatar

1
2 3 4 5
13