question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pnpm not working with nx - more explained inside

See original GitHub issue

Hi,

I am trying to use pnpm with nx. I have brand new project. I did a pnpm install

and it created the following .bin under node_modules (notice the missing nx)

image

if you look further down there is a .pnpm directory which contains it

image

executing NX from a nx repo that has been installed with NPM and NOT pnpm - gives the following - so it works

➜  deleteme2 git:(master) npm run nx

> deleteme2@0.0.0 nx /Users/ian/Development/Personal/typescript/deleteme2
> nx

Nx - Extensible Dev Tools for Monorepos.

But on the pnpm one

➜  instant-accounts git:(feature/initial-setup) ✗ npm run nx

> instant-accounts-ws@0.0.0 nx /Users/ian/Development/Personal/typescript/instant-accounts
> nx

sh: nx: command not found

Anybody managed to get a good workflow working with pnpm and nx ?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Ontic-Entitycommented, Jun 14, 2022

Having similar issues on migration attempt.

0reactions
alexgorbatchevcommented, Oct 22, 2022

There are still issues with pnpm. Simply following NX tutorial and generating a new project then running pnpm i, nothing works in VSCode. The NX Console extension doesn’t work and VSCode doesn’t pick up on any types or modules. Removing node_modules and running npm i fixes all issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pnpm and Nx monorepo. Part 2 - Javier Brea
In this post we are going to see how to build a monorepo using Pnpm and Nx, that, used together, will cover all...
Read more >
Setup a Monorepo with PNPM workspaces and speed it up ...
In this article we're going to have a deep dive into setting up a new monorepo using PNPM workspaces that hosts a Remix...
Read more >
Adding Nx to NPM/Yarn/PNPM Workspace
In a package-based monorepo, Nx only manages the scheduling and caching of your npm scripts. Hence, it can easily be adopt incrementally by...
Read more >
Switching an NX repo to use PNPM - Medium
Things to note. Ensure you build/run everything after conversion. PNPM does not hoist all dependencies into your node_modules root, this means if the...
Read more >
pnpm/pnpm - Gitter
Is anyone else having issues with pnpm and nextjs/react? ... Window does not exist globally in the Node package so the JQuery type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found