Hi guys, I'm trying to install prism but it's not ...
# random
e
Hi guys, I'm trying to install prism but it's not possible. The moment I do "prisma -v" the console returns "zsh: command not found: prisma". When I install it using "npm install -g prisma" it seems to install, but the terminal returns sh: 1: prisma: not found. Thank you very much.
d
Check your npm installation and make sure that the global node modules are on your PATH.
c
and prisma is an app instead of npm package, if i’m not wrong, like mysql
d
No, Prisma has a CLI part and a server part, the server parts get shipped in Docker containers. The CLI is what you get with installing the npm package. The CLI can, amongst other things, generate docker compose files for you that allow you to quickly get a prisma docker container, and hence the server, set up. You never install the server part just like that.
c
thx
e
thx mate, will check in a sec
Is it possible that the compose is incorrectly installed? still doesn't work for me. I create a "new-proyect" directory and I did these steps: 1. npm init -y 2. yarn global add prisma (i try with npm too) 3. prisma -v command prisma not found
so with this new project we can make sure that the node_modules are in my PATH.
right?
I install too babel and nodemon before prisma in order to check the path of node_modules
so i have: my-proyect -node_modules -vscode -resolvers
and the package.json inside the directory of my-proyect
d
@eolxsi Having your node modules on your path has nothing to do with a specific project. It’s an env var in your shell and can be set to autoload when you open a shell by configuring the shell profile. In my case,
.zshrc
, I have the following line:
export PATH="$HOME/.npm/bin:$PATH"
(OSX) to bring globally installed node modules onto the path and make them visible. If you use plain bash,
~/.bash_profile
is your friend, … etc. Check where your npm modules are located. Likely the same folder (
~/.npm/bin
). Check if you can call
~/.npm/bin/prisma -v
. If yes, your shell is not configured.
👍 1