repl won’t run my code, keeps throwing
Console says:
npm run dev
> shorturl@ 0.0.3 dev
>nodemon server.js
sh: nodemon: command not found
exit status 127
My code
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Challenge: URL Shortener Microservice
Link to the challenge:
Normally you would use something like nodemon by installing it globally. I don’t know how you would do that on replit.
You could follow the advice here and see how that works for you.
I just tried: npm install -g nodemon
It returned a bunch of errors
Yeah, I assume that you can’t do global installs on repl. It’s kind of a “fake” environment, a sandbox. Global installs are what you would do on your system.
I have nodemon inside of my dev dependencies
"devDependencies": {
"nodemon": "^2.0.12"
}
It still returns “sh: nodemon: command not found”
I’ve looked around on the internet and found nothing that helps, I’ve also tried starting a new repl
Sky020
February 19, 2022, 7:35pm
6
Hello there,
I got it working, by installing the dependencies:
npm ci
You should be able to do this in either the console or the shell.
Hope this helps
3 Likes
system
Closed
August 21, 2022, 7:45am
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.