How to install new packages
I know how to install packages through repls ways, in the side bar. And i also know how to install packages in the shell. But in the shell, sometimes I want to install a package that adds a new command to the terminal, like the package Slappey
I normally do
npm i slappy and it is done. then to run the command i do
slappey. it says it is not defined. I also know you have to do
npm i slappey -g but it wont let me do that for some reason. any help?
Hit Ctrl + Shift + S to login to your Repl's Shell.
You will notice a new window under the console
That will install the package manually.
If you want to install it automatically then, just import or use that package, it will automatically install the required files needed.
Hope this helps
Hey! I know why!
- Don't worry about using npm, just require the module and boom it installs
- Repl.it won't let you install things globally, so don't use the console in the first place!
Mark as correct by clicking the check mark if this helps in any way!