#NestJs CLI

37 messages · Page 1 of 1 (latest)

tired fractal
#

Hello everyone
I got this error => Zsh: usr/locale/bin/nest Permission denied on macbook pro m1 ?????

twilit bison
#

How did you install the CLI? What does ls -l /usr/locale/bin/nest return?

tired fractal
#

It's my first time to use nestjs on this mac and I used
npm install -g @ivory vigil/cli

twilit bison
#

@nest/cli or @nestjs/cli?

tired fractal
#

lrwxr-xr-x  1 ahmedsayed  wheel  43 Mar 18 00:47 /usr/local/bin/nest -> ../lib/node_modules/@nestjs/cli/bin/nest.js

twilit bison
#

wheel being the owner means that sudo will need to be used

tired fractal
#

Yes @ivory vigiljs/cli sorry

twilit bison
#

Wait, that's wheel group

tired fractal
twilit bison
#

And it looks like other should have execution permission

#

Can you do which nest just to make sure that's the correct location

tired fractal
#

Sorry?

twilit bison
#

which nest

tired fractal
#

nest not found

#

ahmedsayed@ahmeds-mbp ~ % which nest
nest not found

twilit bison
#

Well that would be a problem wouldn't it?

#

Do you use nvm or Volta or anything like that?

tired fractal
#

no

twilit bison
#

I'd suggest using a node version manager as they'll wrap npm and make the install for global packages go to a directory where you have full access

tired fractal
waxen lantern
#

For install global deêpndency in macOs,
By default it require use a superuser permission to write in path of global node_modules directory

#

So have 2 method to do

  • use sudo -i then login with super user password
  • grant access to your user to write in global node_modules directory
#

Actually, I’m not suggest user install nodejs from nvm
Should only use .pkg file

#

With default setting

#

I help us easily to trace any issue by search

twilit bison
tired fractal
#

It installed after using sudo -i and I can use nest command in terminal but I couldn't use nest in VSCode also get not found

waxen lantern
#

Restart you computer first

#

(After install)

twilit bison
#

That would mean that your vscode terminal is not the same as your regular terminal or it has not been updated since the install(s)

waxen lantern
#

Open the Terminal, then run cli

#

I hate vscode, because it slim but not enought feature by default to use

sage maple
#

What about npx nest ? @tired fractal
And npx @nestjs/cli new to create a new project

twilit bison
waxen lantern
#

I like webstorm, because it can be use in both Mac and Windows

#

And nothing different to config