everybody. I have problems with NodeJs and npm. At first, I have error in my code that ‘express’ has already been declared, when i wanted to work with Express JS. If I replace ‘const’ on ‘let’ there is another problem: “‘listen’ in string ‘app.listen’ is not a function.”, but everybody don’t have any problems with this simple code:
const express = require('express'); const app = express(); app.listen(3000);
I didn’t find solutions to these problems and I decided to reinstall Node Js. And after that command npm i
doesn`t work now exactly. Terminal write this:
enter image description here
Please, help me to resolve these problems with my Node Js, which shouldn’t be at all. Thanks!
PABLO _6612 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.