pnpm: command not found?
Asked Answered
H

3

10

Inside a next.js project I try to type npm run dev in the terminal, but nothing happpens. Except this: sh: pnpm: command not found.

I think I am in the correct folder, and I also have run npm install. This is an existing project, that I have cloned.

What can I do to resolve the issue?

Hardpressed answered 27/11, 2023 at 9:27 Comment(0)
H
18

Install pnpm with npm i pnpm --global. Or use npm.

Hatching answered 31/3 at 14:5 Comment(1)
Welcome to StackOverflow. Please, edit and try for How to Answer, describe the effect of what you propose and explain why it helps to solve the problem. Consider taking the tour.Gaffney
A
11

You will have to run corepack command to enable pnpm:

corepack enable pnpm

Amberly answered 4/4 at 10:14 Comment(0)
L
0

Run this powershell with administrator

corepack enable pnpm

after that run pnpm -v later you will be given the option to install core pnpm you select Y and try again

this works on my windows 11 pnpm version 9.9.0

Livingston answered 6/9 at 2:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.