Questions tagged [pnpm]

pnpm uses hard links and symlinks to save one version of a module only ever once on a disk. When using npm or Yarn for example, if you have 100 projects using the same version of lodash, you will have 100 copies of lodash on disk. With pnpm, lodash will be saved in a single place on the disk and a hard link will put it into the node_modules where it should be installed. As a result, you save space on your disk and you have a lot faster installations!

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

Astro dev, failing with vite:import-analysis on internal package when using pnpm

I have a Astro frontend in my PNPM monorepo, but whenever I try to run it with astro dev I get an unusual error like the following 5:21:51 PM [vite] Internal server error: Failed to parse source for ...
Nikola-Milovic's user avatar
0 votes
1 answer
35 views

pnpm install: ERR_PNPM_LINKING_FAILED ("operation not permitted, rename[...]")

I started on a completely fresh Windows (11) system, installed Node, pnpm and so on. When running pnpm install, I've got the following error: "ERR_PNPM_LINKING_FAILED Error: EPERM: oprtation not ...
Joram's user avatar
  • 101
-1 votes
0 answers
13 views

Failed to Install npx with pnpm Inside Debian Container

When I try to manually installed npx (as user root): /root/.local/share/pnpm/pnpm i npx I get the following error:  ERR_PNPM_ADDING_TO_ROOT  Running this command will add the dependency to the ...
Frederick Ollinger's user avatar
1 vote
0 answers
8 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,946
0 votes
1 answer
14 views

Warning about NEXTAUTH_URL in Development Console

I am developing a Next.js web application with next-auth for authentication, and I've encountered a warning message in my development console when running the application. The message looks like this: ...
Lakshan Rukantha's user avatar
0 votes
0 answers
4 views

Install Eslint config airbnb dependencies with 'pnpm' in Astro React project

We are using pnpm as our package manager inside our Astro React project. I need to setup Eslint config Airbnb. In the readme it says use npx install-peerdeps --dev eslint-config-airbnb to install all ...
meez's user avatar
  • 3,843
1 vote
0 answers
31 views

Cannot start Tauri dev server - "beforeDevCommand terminated with a non-zero status code."

I'm attempting to follow the guidance on creating a Tauri app. I've installed all the prerequisites, using Linux Mint. I'm trying to learn Rust & React so I want to start a new project. Though I ...
Jacob Rolph's user avatar
0 votes
0 answers
26 views

Vs code autocomplete not recognizing tsconfig paths for node_modules with custom export rules

I am working in a pnpm workspace setup. The folder structure looks like the following PNPM-WORKSPACE lib/package.json lib/generated/a.js app/tsconfig.json app/src/b.js The package.json in the library ...
Abhirup Pal's user avatar
0 votes
1 answer
44 views

Tailwind config for packages in monorepo

I am trying to create a monorepo using Vite, React, TailwindCSS and pnpm (repository here). My tailwind config files are under src/apps/app. When using the Page from src/packages/feat-page, the ...
Hame's user avatar
  • 494
0 votes
0 answers
18 views

How replicate this setup from NPM to PNPM (package.json in subdirs)

In my current codebase I have a structure and setup something like this: root - package.json - subdir - package.json - subsubdir - package.json root/package.json: { "...
o01's user avatar
  • 5,231
0 votes
1 answer
11 views

ERR_PNPM_CONFIG_CONFLICT_LOCKFILE_ONLY_WITH_NO_LOCKFILE Cannot generate a pnpm-lock.yaml because lockfile is set to false

I deleted the pnpm-lock.yaml file so that i get the latest dependency ran the pnpm i command so that new pnpm-lock.yaml with the latest dependency gets generated. but unfortunately pnpm-lock.yaml did ...
shanmugam vairavan's user avatar
0 votes
0 answers
43 views

node dependencies not found when running pnpm install

I have been using pnpm instead npm for my new projects to try it out and i have ecountered an issue. I will take my nuxt project as an example. I first setup my project using the following command: ...
Cihaan's user avatar
  • 37
0 votes
0 answers
7 views

Why is the execution logic of pnpm -w i in pnpm 8 different from that in pnpm7?

When I run pnpm -w i on pnpm7, it only installs global dependencies (not workspace dependencies). But on pnpm8, when I run pnpm -w i , it installs all workspace dependencies. I would like to be able ...
zhang chuanheng's user avatar
1 vote
0 answers
13 views

Error when using DOCKER_BUILDKIT=1 with Docker --mount flag in Bitbucket CI/CD pipeline

I'm encountering an issue when trying to use the DOCKER_BUILDKIT=1 flag in combination with the Docker --mount flag within a Bitbucket CI/CD pipeline. My goal is to maximize caching performance when ...
Rich's user avatar
  • 3,938
0 votes
0 answers
48 views

How do I make pnpm work as intended in a vscode dev container?

I am coding in a vscode dev container, where pnpm was installed as suggested in the docs, using curl: RUN curl https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" SHELL="$(which bash)&...
Magnus's user avatar
  • 6,839
1 vote
0 answers
23 views

How to replace workspace:^ with workspace:* in pnpm?

I am using pnpm to manage packages. When I add a workspace dependency using pnpm add shared-configs --workspace --filter package-b, pnpm generates this in package-b's package.json file: "...
Epple's user avatar
  • 652
-2 votes
0 answers
15 views

Nestjs ENOENT: no such file or directory, open '/root/.local/share/pnpm/store/v3/files/cd/1a5488...-index.json'

ENOENT: no such file or directory, open '/root/.local/share/pnpm/store/v3/files/cd/...
Joshua Alex's user avatar
0 votes
1 answer
29 views

pnpm workspaces – 'Foo' cannot be used as a JSX component

When I run ./node_modules/.bin/tsc --noEmit I get the following error: [filepath]/component.tsx:17:4 - error TS2786: 'ContainerA' cannot be used as a JSX component. Its element type 'ReactElement<...
Kirk Strobeck's user avatar
-1 votes
0 answers
44 views

TypeScript error: Cannot read property 'length' of undefined

1. When it came: Performing the rush build command in a monorepo project. 2. Error Message: /common/temp/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:100920 ...
fariyAhill's user avatar
0 votes
0 answers
32 views

What is the equivalent to npm install --legacy-peer-deps for pnpm?

What is the equivalent of npm install --legacy-peer-deps for pnpm? I tried pnpm install --legacy-peer-deps but it is not recognized:  ERROR   ERROR  Unknown option: 'legacy-peer-deps' Did you mean '...
sashoalm's user avatar
  • 75.2k
1 vote
1 answer
37 views

Build fails after swapping to pnpm: RollupError: Unexpected character '\x7F' (caused by parse error in node-canvas / pdf.js)

Thanks in advance for any help. TL;DR: I have a parse error at build time bubbling from node-canvas and pdf.js. This is caused by Rollup reading the canvas.node binary, which shouldn't even be in the ...
Oscar Hermoso's user avatar
0 votes
0 answers
16 views

ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies github action

Environment React Typescript Emotion PNPM Monorepo Github Action name: cart npm publish on: release: types: [published] workflow_dispatch: defaults: run: working-directory: packages/...
Byeongin Yoon's user avatar
0 votes
0 answers
17 views

pnpm builds wrong path to webpack.js

pnpm start fails because it builds wrong path to webpack.js This setup was working fine till a few days ago. The only changes were to webpack config to add sharing. Now pnpm start outputs [email protected] ...
nan12's user avatar
  • 39
1 vote
1 answer
17 views

How to localize the dependencies of a package in node_modules

Here is my project's package.json "dependencies": { ... "react-infinite-viewer": "^0.28.0" } Dependencies of this package: myproject -> react-infinite-viewer -...
NaN.'s user avatar
  • 31
0 votes
0 answers
23 views

Can I use lambda with monorepo and use the internal packages with pnpm?

I have a monorepo that looks like so: monorepo ├── Dockerfile ├── README.md ├── apps │ ├── lambda-app-1 │ ├── index.js ├── node_modules ├── package.json ├── packages │ ├── package-1 ├── pnpm-...
eliezra236's user avatar
1 vote
1 answer
92 views

Typescript errors after switching from npm to pnpm

I am trying to switch a legacy (very old fashioned Angular JS) project from npm to pnpm and am struggling with typescript errors. The vast majority are things like error TS2339: Property 'mock' does ...
baldmark's user avatar
  • 659
0 votes
0 answers
24 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
0 votes
0 answers
39 views

How does pnpm-lock.yaml work in mono repo

I am at present working on npm to pnpm migration. I have couple of doubts. The project structure goes like this: Before: Root projectAUsingGo projectAUsingPython UI web (main project) package.json ...
Mithun Shreevatsa's user avatar
0 votes
2 answers
39 views

is it possible to fixed the warning caused by third party dependencies in react app

Today when I using pnpm install command to install the react app dependencies, shows warning: > pnpm install  WARN  deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x....
Dolphin's user avatar
  • 29.5k
1 vote
0 answers
80 views

Pnpm cannot import @testing-library/jest-dom/matchers

I'm migrating from npm to pnpm. I have problem with unit tests. This import gives me error: import matchers from '@testing-library/jest-dom/matchers'; Could not find a declaration file for module '@...
Rozrewolwerowany rewolwer's user avatar
0 votes
0 answers
16 views

The uniapp cli run is suddenly interrupted with this error(WeChat applet)

enter image description here It's a vue3+ts project created by uniapp,Have to re-pnpm run dev:mp-weixin to get it to work, not sure why this is happening,The location of the code that reported the ...
clarehjh's user avatar
0 votes
0 answers
34 views

In monorepo, Next.js throw compile error when build a pacakge used in Next.js

First, I apologize for the lengthy question. I'm currently experiencing issues while using Next.js in a monorepo. The situation is as follows. For example, in the monorepo, there are two packages: ...
wallah's user avatar
  • 1,964
0 votes
0 answers
20 views

Bin executables can't be found after changing `modules-dir`

I have a need to use some folder name other than node_modules for the dependencies of my packages in a pnpm workspace. I thought this seemed like it would probably be plagued with systemic issues, but ...
Stabby's user avatar
  • 97
0 votes
0 answers
99 views

Error: EPERM: operation not permitted, scandir using pnpm

I tried everything, deleted cache, node_modules, changed permission of all my folders to Full Control and nothing worked, please help me guys builder:build: [Error: EPERM: operation not permitted, ...
Joao Vitor's user avatar
0 votes
0 answers
16 views

webpack produces inconsistent results with packages installed using pnpm link

I have a node project and an npm package that's used in that project. I need to produce a source code archive that anyone else can use to build the project and get the same exact result as me. I can't ...
Michal Vašíček's user avatar
0 votes
0 answers
28 views

Compiling SASS dependencies in a publishable Nx/Nrwl library... NPM vs PNPM

Given a single script run in both NPM and PNPM, the NPM version will succeed whereas the PNPM one fails. npx sass --style=compressed --load-path=node_modules ./lib/path/to/style.scss ./lib/prebuilt-...
iamsar's user avatar
  • 1,090
0 votes
0 answers
28 views

pnpm update vs nx migrate are giving different results

I want to use nx's migrate feature to maintain & update the package.json dependencies. I use pnpm as my node package manager. When running pnpm update, pnpm lists us all the outdated packages and ...
Fares's user avatar
  • 923
0 votes
1 answer
85 views

MongoMemoryServer - Instance failed to start because a library is missing or cannot be opened: "libcurl.so.4"

I'm writing an integration test using jest. The test was successfully run on my Mac. But it throws an error in Bitbucket pipelines. I'm using pnpm in Bitbucket pipelines. The error is: FAIL __tests__/...
Ikram Ud Daula's user avatar
0 votes
0 answers
11 views

pnpm build dist has .pnpm.js how to solve it

In the vite + vue3 project, I use pnpm to install dependencies, and when I execute pnpm run build,It seems that the public package is packaged as as .pnpm.js please check this image when i use npm to ...
ds aas's user avatar
  • 1
2 votes
0 answers
90 views

Create project React/Vite = Error : ELIFECYCLE Command failed with exit code 1

I've just created a React project with Vite. My project displays correctly in the browser, but when I press CTRL+C in the terminal to quit, I encounter this error: "ELIFECYCLE Command failed with ...
MarionB's user avatar
  • 21
0 votes
0 answers
45 views

Sharp, Pnpm on windows The specified procedure could not be found

I am trying to run an application that is dependent on sharp. I get this error when I try to run the application. I use pnpm as package manager I did a lot of digging around this. But unable to find ...
dewesh jha's user avatar
0 votes
0 answers
161 views

Deploying monorepo projects to AWS Lambda with dependencies

I have set up a Node.js (Typescript) based Monorepo, and I am using Turborepo as the tool to manage the Monorepo. I am using pnpm as my package manager. All my main projects are present in the apps ...
Nikhil Baliga's user avatar
0 votes
1 answer
92 views

ERROR Symlink path is the same as the target path (/vercel/path0/node_modules/next)

I got this on Vercel when deploying after changing my repo name in an app using the pnpm package manager. Running build in Cleveland, USA (East) – cle1 Cloning github.com/myorg/myrepo (Branch: ...
Lance's user avatar
  • 75.4k
-1 votes
2 answers
34 views

Why `git add . ` command sometimes doesn't adds lockfile to staging area?

When I do git add . in a monorepo with pnpm, sometimes it doesn't include lockfile to staging area.
Nightvision's user avatar
0 votes
1 answer
174 views

Next.js How to fix ERR_PNPM_OUTDATED_LOCKFILE?

When I deploy my project to Vercel, the build fails with this error: ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up-to-date with package....
Coder Gautam YT's user avatar
0 votes
0 answers
9 views

How to write and use a node.js library that creates and uses a file in it's project root

I have a library called lheadsup, that needs to create a file and use that file as a lookup for further calls. But the file needs to be created before using the library as part of a prebuild step, ...
eguneys's user avatar
  • 6,056
3 votes
0 answers
241 views

turborepo getting error with pnpm ( Cannot find module '/app/apps/backend/pnpm' )

I'm getting this error while i was triying to run my dockerfile node:internal/modules/cjs/loader:1080 Error: Cannot find module '/app/apps/backend/pnpm' code: 'MODULE_NOT_FOUND', exited with code 1 ...
Munavvar Sinan's user avatar
0 votes
1 answer
111 views

Set vite env-varible value in the pnpm script

I tried to set varible right in to the pnpm script: "build": BUILD_PLATFORM=web vite build But getting an error: 'BUILD_PLATFORM' is not recognized as an internal or external command ...
Mero's user avatar
  • 630
0 votes
1 answer
188 views

Error: Unable to resolve module react-native while using pnpm workspaces

I have been developing monorepo setup using pnpm workspace where I am trying to integrate a react native mobile app. The app is using a shared package where all the common ui elements are stored. I ...
Annie's user avatar
  • 1
0 votes
0 answers
29 views

pnpm monorepo installed serval version of vite, it caused some typescript problem.it mismatching version of vite

Here is my problem, I have a monorepo which use pnpm,inside this monorepo i have ./packages/appsA and /packages/appsB and /packages/appsC. appsA installed [email protected], appsB installed [email protected]. inside ...
Egssy's user avatar
  • 23

1
2 3 4 5
8