I'm new to using node/npm and encountering an issue when attempting to start an npm script.
Every time I try to execute a simple script like the one below, I get the error message "bin is not recognized as an internal or external command." I have successfully run some previous scripts before, so I'm not sure if my npm installation is faulty or if I made a mistake somewhere.
#! node
const app = require('../lib/app')
const config = {
port: 8080
}
app.listen(config.port, () => {
console.log(`Chat is waiting for you at http://localhost:${config.port}`)
})
I've attempted uninstalling and reinstalling it. I also referred to this post: npm bin command - not recognized as an internal or external command and tried running npm install -g without success.
I am currently using Windows operating system.