Issues using pnpm

I created a new project, then ran rm -rf node_modules and pnpm install and the following happened:

Is there something I’m missing to be able to use pnpm?

Hi there - to make sure your project has pnpm enabled, can you run enable-pnpm in the terminal. This should trigger a pnpm install without you having to run the pnpm i command.

Oh whoops, I forgot to include that in the first post. I ran enable-pnpm before running pnpm install as well and that was the result.

Is graceful-fs one of your projects dependencies? It could be that it’s not compatible with that version of Node. If it’s not a dependency of yours, though, email with this info and we can look into it further on Monday when we get back!

For anyone else who runs into this issue, from Glitch support:

1 Like

I ran into a similar issue while using Node 16 and pnpm to manage my monorepo. It worked fine on my development machine but failed when I tried to deploy it to Glitch. The workaround for me is,

  1. Install pnpm to the project’s root package.json. pnpm add -D pnpm@7.27.0 -w, or npm i -D pnpm.
  2. Then, you can run any pnpm command by prefixing it with ‘npx’, such as ‘npx pnpm add A-Package --filter A-Sub-Project’ or ‘npx pnpm A-Script’, etc.

Basically, instead of using glitch’s pnpm 2.25.5, you install a newer pnpm at your project root.

can you check if dependencies take up project disk space when using this technique?