Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
93 views

"Error: packages field is not an array when using pnpm-workspace.yaml in a monorepo setup"

I'm working with a PNPM monorepo setup, and everything was working fine when I was using pnpm.yaml, but after switching to pnpm-workspace.yaml, I’m encountering the following error: ERROR  packages ...
Naga mani kanta manam's user avatar
0 votes
0 answers
49 views

Cannot find module '[email protected]' by pnpm

I tried to migrate an old project from NPM to PNPM, but after running pnpm install, when I try to start the project, I encounter a MODULE_NOT_FOUND error. How can I fix this issue? node:internal/...
J. Hu's user avatar
  • 53
1 vote
0 answers
251 views

Error pnpm: Symlink path is the same as the target path (Windows)

I've been searching for days how to fix this issue but havent managed to find a solution. The problem: I have to repos: Main Repo and side Repo. I need to use a package from side repo locally inside ...
Luis Guareschi's user avatar
0 votes
1 answer
2k views

npm error code EUNSUPPORTEDPROTOCOL npm error Unsupported URL Type "workspace:": workspace:*

The error is coming because the project is setup to use pnpm. But what I want is to display a suitable message to the user to let them know that they have to use pnpm instead of npm or yarn. I have ...
ROHIT SOMVANSHI's user avatar
0 votes
0 answers
318 views

How to run a postinstall script after the package.json file is written?

I currently use pnpm as package manager. I'm maintaining a monorepo (around 30 packages) that has a postinstall script at the monorepo root. This script will run a local custom script that should ...
Steve B's user avatar
  • 37.8k
0 votes
1 answer
255 views

Pnpm workspace config to publish pakcages under a specific directory only

I have created a monorepo, and the folder structure is like the below screenshot. Currently, if I run pnpm publish in the root directory, it will publish the root project pnpm-trial and all the libs ...
huan feng's user avatar
  • 8,653
1 vote
0 answers
269 views

pnpm config set auto-install-peers true not working with workspaces

I have this configuration below in .npmrc The below settings absolutely work fine within the single repo auto-install-peers=true legacy-peer-deps=true save-exact=true node-linker=...
Mithun Shreevatsa's user avatar
3 votes
0 answers
2k views

Turborepo(Docker), PNPM workspace dependency package version mismatch

I am starting a project using Turborepo with PNPM as the package manager and for it to be Dockerised. I have installed Turborepo using npx create-turbo@latest(selecting PNPM during the setup) and have ...
daniel blythe's user avatar
8 votes
0 answers
4k views

how to run watch script in pnpm workspace

If I have structure like this packages - alice - bar - foo package.json alice, bar, foo are three sub packages. bar is the dependency of alice. Every sub package has its own watch script ...
Lynch's user avatar
  • 101
8 votes
1 answer
3k views

Publish NPM package that uses a workspaces as dependencies

so I have a project that I'm working on that is a Monorepo. So I have a packages directory in the root directory that contains all my npm packages. Some of these packages rely on eachother e.g. in a ...
Artrix's user avatar
  • 188
0 votes
1 answer
90 views

Inconsistencies between node's `spawn` and terminal

I'm trying to run a script from node, and I'm seeing different behaviour compared to if I run it from the terminal and I don't understand why. I'm trying to do something a little bit out there, in ...
Ian's user avatar
  • 34.6k
6 votes
3 answers
4k views

pnpm provides different hashes for the exact same version of the same dependency, breaking nestjs

I have a monorepo with a very basic setup available for reproducing this issue here: It is a single nestjs app with 2 packages that it reads from. @nestjs/core among other dependencies is needed for ...
SebastianG's user avatar
  • 9,654
14 votes
1 answer
10k views

pnpm in monorepo - how to run a command only in a specific package?

Let's say I want to install a package in a specific package in my monorepo, how do I do this from root? in npm, you can do this with something like this: npm install react --workspace=a I searched ...
Jonathan Lightbringer's user avatar
4 votes
2 answers
6k views

pnpm workspaces does not allow installing of dependencies on brand new projects `cannot read properites of undefined (reading 'manifest')`

I'm trying to use pnpm with lerna to create a monorepo. Unfortunately it all fails when attempting to install lerna itself via pnpm. Current project structure: lerna.json contents: { "packages&...
SebastianG's user avatar
  • 9,654
33 votes
2 answers
30k views

How to add dependency to PNPM workspace?

I start using PNPM Workspaces, and I'm struggling in how to add dependencies to any specific workspace as I would do in yarn running: yarn workspace <workspace_name> add <package_to_add> ...
Arnautg's user avatar
  • 1,109