Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
8 votes
2 answers
3k views

How to configure Webpack to load a module from its src folder instead of dist?

I am working on a monorepo and therefore I want Webpack to load my sources from src instead of dist (dist is specified in package.json). For example given the following structure: /packages/core/...
Kai Sellgren's user avatar
  • 29.6k
7 votes
1 answer
5k views

Resolving TypeScript dependencies in yarn workspaces

I'm currently trying to set up a React/TypeScript monorepo with two workspaces, @scope/project-lib and @scope/project-app. I have @scope/project-app's package.json importing @scope/project-lib: "*...
Mogarrr's user avatar
  • 383
6 votes
0 answers
1k views

lerna not generating node_module in packages

I have a monorepo with Lerna and typescript with a basic structure - root package.json - packages package-A package.json src package-B package.json ...
AngularDebutant's user avatar
5 votes
1 answer
3k views

How to set up Lerna monorepo with TypeScript

I have a core library with the following in package.json: "main": "dist/cjs/index.js", "module": "dist/esm/index.js", "es2015": "dist/es2015/index.js", "types": "dist/es2015/index.d.ts", "typings": "...
Kai Sellgren's user avatar
  • 29.6k
5 votes
1 answer
3k views

How to use eslint plugin modules located in parent directory?

I have some services organized into a monorepo in such a fashion: repo_root/ ├── services/ │ ├── service_one/ │ ├── service_two/ │ └── service_three/ ├── package.json ├── node_modules ├── ....
Brian Dennis's user avatar
5 votes
0 answers
674 views

lerna publish push to npm, but not updating dependencies

My Monorepo is currently managed by Lerna.js. It all works fine except for the GitHub actions workflow I use to automate the npm publishing. The situation is as follows: I update packages/types-lib, ...
Cod3n0d3's user avatar
  • 253
3 votes
0 answers
1k views

TurboJs: Support for lockfiles without a 'packages' field isn't implemented yet

After upgrading turbo from 1.8.2 to 1.8.3, I receive this error message: Issues occurred when constructing package graph. Turbo will function, but some features may not be available: 18 errors ...
TOPKAT's user avatar
  • 7,989
3 votes
1 answer
4k views

How to execute nested "npm run commands" inside an npm@^7.0.0 monorepo set up within the context of the current workspace?

I have a monorepo with several workspaces within it. It has been very common for me to use chained npm scripts for simple tasks instead of using a task runner. So for example, the following ...
denik1981's user avatar
  • 380
2 votes
2 answers
738 views

How do I structure my NPM package to contain subfolders for types and functions?

I am trying to create a NPM package that can be used locally to share types and functions in the rest of my project. Let's call my project wordle. As you could probably tell by the mention of types, ...
nikord's user avatar
  • 55
2 votes
1 answer
4k views

NX package-based repo: projectRoot vs workspaceRoot?

If I have a package-based monorepo with NX, which directory is projectRoot, and which one is workspaceRoot? From the docs (https://nx.dev/reference/project-configuration): {projectRoot} and {...
scriptin's user avatar
  • 3,090
2 votes
0 answers
86 views

Why expo/tsconfig.base uses moduleResolution node?

Why expo tsconfig.base uses "moduleResolution": "node" instead for example "moduleResolution": "node16". I'm asking this because I'm working in a monorepo and I'...
NovaBG03's user avatar
2 votes
0 answers
373 views

How do you configure dependent packages in a monorepo for publishing?

I have a monorepo (using Bun.js workspaces) that has two packages, one dependent on the other. In addition, both these packages will be published for others to use on NPM. The problem is that when the ...
user avatar
2 votes
0 answers
252 views

NPM: how to publish a npm module with local dependencies in a monorepo?

I have a monorepo architecture that can be simplified like so: bootstrap/ ├── module1/ │ └── package.json # uses "module2" package └── module2/ ├── global.d.ts # contains global types ...
TOPKAT's user avatar
  • 7,989
2 votes
1 answer
1k views

Npm workspaces: Different "main" property for development and publishing?

I've created an npm workspace with two packages "foo" and "bar". Furthermore, I'm using typescript so both packages contain a src/index.ts. During development, I want to have the &...
Kristof Komlossy's user avatar
1 vote
2 answers
4k views

How to format / test before every push in a Node.js monorepo?

I am aware of several tools like husky, lint-staged and prettier, currently I have a monorepo that is using yarn workspaces and lerna, before every push using git I want prettier to format my code and ...
user avatar
1 vote
1 answer
569 views

How can I ensure version consistency of duplicated dependencies in a Javascript monorepo?

I have a Javascript (Typescript) monorepo. Each of my packages has its own package.json where it defines dependencies. Some of those external dependencies might be duplicated in more than one package. ...
Sasgorilla's user avatar
  • 2,960
1 vote
1 answer
929 views

NX node application: generated dist/.../package.json file does not include a "dependencies" section at all

I have a NX monorepo I created a new CLI node.js app called nodeapp1 app using command: nx g @nrwl/node:application nodeapp1 When running nx serve nodeapp1 -or- nx build nodeapp1, it does generate a ...
LaVache's user avatar
  • 2,579
0 votes
1 answer
4k views

Monorepo: Yarn workspaces not working - dependent package doesn't get installed in node_modules

I am using monorepo created using Yarn Workspaces with Typescript which has a react-native project (mobile folder) and a common folder which contains the common files to be shared across projects. ...
Joshua's user avatar
  • 1,343
0 votes
1 answer
530 views

Using a single npm workspace/project within a forked monorepo?

One of our project's dependencies requires some additional modifications so that we can it. At first it was in its own repository, but then the owner moved it into a monorepo with a number of other ...
nvahalik's user avatar
  • 559
0 votes
0 answers
24 views

pnpm align dependency versions across packages in monorepo

I'm building an extension for Prisma, and I've put two workspaces into a monorepo, one for the package itself, and one for development testing: /package.json /pnpm-workspace.yaml /package/package.json ...
philolegein's user avatar
  • 1,411
0 votes
0 answers
68 views

Monorepo organization npm

I have a monorepo where i store my nestjs app and expo react native app /apps/nestjs /apps/expo package.json this is my main package.json "name": "monorepo", "version&...
danyalutsevich's user avatar
0 votes
0 answers
392 views

Turborepo/Monorepo multiple jest versions

I've got a turbo repo with two folders, apps and libs. Inside libs I have several packages. I'm trying to upgrade the packages in libs to a newer version of jest one at a time, but I'm struggling to ...
Tim McIntire's user avatar
0 votes
0 answers
82 views

Trouble linking types to both dev and production in a monorepo

I have some trouble linking types to both dev and production in a pnpm workspace monorepo. My IDE was yelling that it cannot find module '****' or its corresponding type declarations when I was ...
Thore's user avatar
  • 1,698
0 votes
0 answers
27 views

require only specific service from a mono-repo package in node

I have a package with several utils services. I have publish and used it many times. Now the package got to heavy to use and I want to use only several parts of it. Is then an option in node to ...
Amit Hajaj's user avatar
0 votes
0 answers
67 views

Trying to create a private monorepo for a number of related NPM packages that can be installed separately

I have a collection of internal color utilities that are broadly useful such as conversions and lightness and blends, and a set of libraries for creating named colors for theming which are not so ...
Bri's user avatar
  • 1
0 votes
0 answers
16 views

Bolt npm : Could not find a workspace named "client"

I'm trying to manage my existing monorepo project with Bolt.I did all basic setup required by this library. But still getting the below error. tried to find the solution on google also but could not ...
Surya Pratap's user avatar
0 votes
1 answer
902 views

nodemon config with yarn workspaces monorepo

I'm having some trouble with nodemon in a yarn monorepo structure. I can't use nodemon src/index.ts in my api package, because it requires functions, enums, and the prisma instance from the orm ...
Drazen Bebic's user avatar
0 votes
0 answers
263 views

Github actions not finding npm script

I got a monorepo with Lerna 6 and npm where building works fine locally but fails on npm. The structure is the following: package.json packages \- build-scripts package.json \- package1 ...
sydd's user avatar
  • 1,928
0 votes
1 answer
208 views

Explicitly specify packages in each package json

Yarn recently introduced berry along with PnP for dependency management. For a number of reasons, I can't update the policy from node_modules to PnP. However, I find the mechanism for checking that ...
Matthew's user avatar
  • 43
0 votes
1 answer
2k views

In NX build, is there a way to get project name in package.json?

I am having a Monorepo and using NX build system. I am trying to figure out a way to inject the project name in my package.json package.json "scripts": { ... "sampleCmd": ...
JDev's user avatar
  • 1,790
0 votes
2 answers
427 views

Nestjs common repo dependency in conflicts with Project repo dependency

I'm working with a home grown mono repo structure in with NestJS and legacy code. The NestJS parts of the monorepo depend on a common folder in the root that is imported into each Nest Project via &...
Chris Rutherford's user avatar
-1 votes
1 answer
561 views

Why would you place dependency in peer and dev?

I was wondering why one would put react and react-dom inside peerDependencies but also under devDependencies? Is a peerDependency not enough for development? Like seen here: https://github.com/...
ViktorMS's user avatar
  • 1,235