Node.js Repl showing up as Bash
Hey
Could you help me solve a problem I'm having with this repl? https://repl.it/@rjlevy/Express-basic-movie-search-with-handlebars
It was originally created as a Node.js repl but some reason has transformed into a BASH repl and doesn't work at all.
Here is the Github repo: https://github.com/rolandjlevy/Express-basic-movie-search-with-handlebars
You previously helped me with this problem: https://repl.it/talk/ask/Why-cant-my-Expressjs-repls-connect-with-my-Github-account/24187
Many thanks,
Roland
I had the same problem. I created a new repl with Node.js as language. Then imported my code from GitHub from the version control (Existing git repository).
Hi @mattiasinokuchi, thanks. I think your solution is good but it will only work if people create a Git repo and push it to GitHub
I’m not v, but why don’t you just add a
.replit
file? It would work just fine with that configuring the run button.Hi @Highwayman
Thanks for your reply. I have added the .replit file and have this for the contents: run = "node index.js" but I get this error:
Error: Cannot find module 'express'
Do you know what I need to do to run node and express?
Many thanks for your help
Roland
@rjlevy try also adding
language="javascript"
to the .replit file.@rjlevy or just actually install it with
npm install express
in the shellHI @Highwayman
Thanks so much for your help. I have installed all the node packages using run = "npm install node" etc
The contents of the replit file is now
language = "javascript"
run = "node index.js"
The repl works but is broken. When it was working it used to make a call to the www.omdbapi.com API using the node-fetch package but now nothing happens.
Do you know why this repl changed into a BASH file? It was previously a node file
Thanks
Roland
@rjlevy sadly I do not know why it turned into a bash file.
hi @Highwayman
Do you know anyone that could help? The repl still doesn't work the way it used to.
Thanks
Roland
@rjlevy not really no. Now would be the time when I wished I was V. Maybe try posting that new question in ask, someone will definitely come to help on that one.
Thanks @Highwayman
Do you know the best way to contact moderators like @Vandesm14 directly?
Roland
@rjlevy maybe on the repl.it discord? Repl.it has a bugs page so you could just use that.
Hi @Highwayman
Thanks for your help with this.
I fixed the problem. The .env file had been deleted so the omdb.com api key was missing - hence the lack of results from the request. I have added the .env file so this issue is now resolved :)
@rjlevy Lol yeah.. that would do it.. happy coding! :)