I'm working on chat application , I'm using express , socket.io, moment and nodemon.
if I run nodemon server.js it works, but if I want to run my script as follow npm run dev
and this is inside my package.josn
"dependencies": {
"express": "^4.17.3",
"moment": "^2.29.1",
"nodemon": "^2.0.15",
"socket.io": "^4.4.1"
}
"scripts": {
"dev" : "nodemon server.js"
}
I'm getting this error :
'...\ChatApp-Rooms\node_modules\.bin\' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'C:\Users\Sam Taklimi\Desktop\nodemon\bin\nodemon.js'
for some reason the path of my nodemon is not correct ?! following stack overflow , in PowerShell I changed
ExecutionPolicy to
Unrestricted
still doesn't work ?