Hi everyone I am getting this error "'prisma' is not recognized as an internal or external command, operable program or batch file." while running prisma login command in cmd I have installed the prisma globally with npm install -g prisma any solution will be appreciated.
It isn't a problem with prisma
, but with how you configured your PATH on Windows.
Windows doesn't know where is prisma
, so you must tell him where to look.
See this answer to learn how to do that: Nodejs cannot find installed module on Windows?
Install it globally with; npm i -g prisma
It isn't a problem with prisma
, but with how you configured your PATH on Windows.
Windows doesn't know where is prisma
, so you must tell him where to look.
See this answer to learn how to do that: Nodejs cannot find installed module on Windows?
Assuming you have prisma
installed in a local project:
npm i prisma @prisma/client
- or -
pnpm i prisma @prisma/client
- or -
yarn add prisma @prisma/client
Just call prisma generate
like this (docs):
npx prisma generate
- or -
pnpm dlx prisma generate
- or -
yarn prisma
It works for all other node_modules
using CLI as well (also in Windows).
If you use bun, then type
bunx prisma
:npm
is equivlant tobun
and likewisenpx
is equivalent tobunx
. You can also writebun x
.- then type
bun prisma init
(instead of justprisma init
).
© 2022 - 2024 — McMap. All rights reserved.