npm-workspaces Questions

1

Here are some related questions: When using yarn workspaces, how to force a package to be installed in the relative node_modules? NPM 7 Workspaces - Multiple node_modules? Should I have to use no-h...
Oubre asked 14/2, 2023 at 10:13

5

Solved

how can I delete all node_modules folders from all packages in an npm 7 workspace? With Lerna we could just execute lerna clean -y but when migrating to native NPM 7+ workspaces, is there some equi...
Bund asked 19/11, 2021 at 6:22

5

Solved

I'm looking for an NPM command similar to lerna ls that would print out all workspaces. For example, let's say I have package1 and package2 in a packages sub-directory and my package.json looks lik...
Elul asked 15/11, 2021 at 20:47

1

I have a script defined in the root-level package.json: { "workspaces": [ "packages/*" ], "scripts": { "clean": "rm -rf lib dist" }, "p...
Haematic asked 18/3, 2023 at 15:23

3

I've created a monorepo with a shared component library, but when I import components from that library that contain a MUI icon from @mui/icons-material I get the following error: Error: Element ty...
Perdu asked 26/4, 2022 at 4:21

1

Solved

I have a monorepo that uses npm workspaces. root/ app/ package.json server/ package.json store/ package.json utils/ package.json The app/package.json file references private non-published ...
Latinism asked 25/6, 2023 at 21:33

2

Using npm workspaces I have a folder structure like this +-- package.json +-- package-lock.json +-- client | `-- package.json +-- shared | `-- package.json `-- server `-- package.json Normally wh...
Isis asked 31/12, 2021 at 7:47

3

I am using the workspaces feature of node/npm and the layout is like that: . +-- package.json `-- packages `-- p1 `-- package.json `-- p2 `-- package.json ./package.json { … "workspace...
Meteorology asked 11/8, 2021 at 7:20

1

I have two packages inside my npm workspace api & cdk. I would like to create an individual package-lock.json inside api & cdk as both of those projects will get deployed individually. Is t...
Androcles asked 5/1, 2023 at 6:56

2

I have a fun project made with create react app. I want to convert the same application to a browser extension. This idea forces me to make the project a mono repo. Because in both applications, I ...
Enright asked 27/12, 2021 at 17:20

0

I have an NPM project structured in workspaces: proj/ +-node_modules/ +-packages/ +-pkg1/ +-src/ |-c1.ts |-c1.test.ts |-package.json |-jest.config.js +-pkg2/ +-src/ |-c2.ts |-package.json...
Viridescent asked 10/12, 2022 at 9:56

1

During my CI deployments I want to only install package relavent depancies required for that run. I can do this with npm install --workspace package-name However I have some root level scripts with...
Rack asked 14/7, 2022 at 10:55

1

I can’t find the answer to this seemingly obvious question anywhere. I have some npm workspaces setup in a project. It’s basically a main project with several workspaces within it. They are in a to...
Todd asked 4/7, 2022 at 3:19

0

We would like to have a workspace with different versions of react in two npm packages of the same workspace, due to one of them having dependencies not yet compatible with v18. However we're not a...
Chignon asked 21/10, 2022 at 6:50

3

I have a NodeJS monorepo set up using NPM workspaces and Typescript. It works fine without Typescript, however introducing TS brings some dependency resolving errors with it. Current directory setu...
Alizaalizarin asked 29/4, 2022 at 8:57

1

Solved

I have a monorepo setup. It looks something like this: project node_modules packages my-first-project prisma schema.prisma my-second-project prisma schema.prisma So both project...
Morality asked 30/7, 2022 at 13:16

1

Solved

I have this monorepo, built using npm workspaces: ├─ lib │ └─ Foo └─ src ├─ App └─ Web I want to update Web to React 18 while leaving App at React 17 Currently (and working), my dependencies are...
Chuu asked 25/5, 2022 at 10:11

1

Say I have the following structure packages - @my-scope/packageA - @my-scope/packageB - @my-scope/packageC Let's say I want to install packageA as a dependency of packageB. With NPM 8 workspace...
Sharleensharlene asked 15/12, 2021 at 23:32

1

I've been setting up a monorepo with the goal of creating a shared component library to use for several different Next.js apps (following this example) but whenever I import a component from the sh...
Valine asked 24/4, 2022 at 17:41

0

Is it possible to run an npm ci --workspace=[some workspace] command and confine the installed dependencies inside that specific workspace directory, instead of bubbling up the shared ones to the p...
Phenocryst asked 10/4, 2022 at 2:34

1

I use npm workspaces. When I install a package for a workspace using nmp i somepackage -w workspace-a it is placed in to the same directory with the workspace if the installed version is different ...
Incognizant asked 9/2, 2022 at 11:23

2

Solved

We have a mono-repo that I'm migrating to npm 7's workspaces. Current folder org: \React - package.json (defines workspaces for \apps and \packages) \apps \someApp - React 17.0.1 (Dependency) ...
Painkiller asked 21/3, 2021 at 21:2

2

Solved

Using NPM Workspaces, I'm sharing one package (components) with others (webapp1 and webapp2). Something like this: root apps webapp1 webapp2 packages components Everything is working well, b...
Kistna asked 24/3, 2021 at 16:58

1

I'm having trouble running my app with NPM 7 Workspaces. I am expecting an npm install from the root folder to create a node_modules folder for each of my workspaces, similar to Lerna. However, whe...
Bromate asked 14/7, 2021 at 17:1
1

© 2022 - 2024 — McMap. All rights reserved.