Ask coding questions

← Back to all posts
Is there a way to install CLI's via NPM without it getting killed everytime?
ALIFAHMY1 (2)

CLI's don't rlly work right for me. These things are mostly used on desktop coding softwares like VSC, but is there any way to get it running on repl.it?

Ps:

I know you can use some with npx, but what about the others that need to be installed with npm?

Comments
hotnewtop
notGilbert (121)

Replit does not allow root access

did you install the package with the -g (global) flag?
ie:

$ npm install next -g
$ ^ will error

$ next dev
$ ^ wont work

that's not allowed in repls (requires root access)

instead, you shouldn't use the flag and just use npx to run it

$ npm install next
$ npx next dev