I want to work with Laravel Broadcasting and follow the instructions, I created a completely new Laravel 8.12 project and try to run with npm run dev command, but I get errors:
npm ERR! code ENOENT
npm ERR! syscall spawn sh
npm ERR! path /Users/administrator/procob
npm ERR! errno -2
npm ERR! enoent spawn sh ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
My package.json:
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"axios": "^0.21",
"bootstrap": "^4.0.0",
"cross-env": "^7.0.3",
"jquery": "^3.2",
"laravel-echo": "^1.10.0",
"laravel-mix": "^6.0.11",
"lodash": "^4.17.19",
"popper.js": "^1.12",
"postcss": "^8.1.14",
"pusher-js": "^7.0.3",
"resolve-url-loader": "^3.1.2",
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"vue": "^2.5.17",
"vue-template-compiler": "^2.6.10",
"webpack": "^5.20.2"
}
}
And full error
22 verbose stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:269:19)
22 verbose stack at onErrorNT (internal/child_process.js:465:16)
22 verbose stack at processTicksAndRejections (internal/process/task_queues.js:80:21)
23 verbose cwd /Users/administrator/procob
24 verbose Darwin 20.2.0
25 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
26 verbose node v14.15.4
27 verbose npm v7.5.2
28 error code ENOENT
29 error syscall spawn sh
30 error path /Users/administrator/procob
31 error errno -2
32 error enoent spawn sh ENOENT
33 error enoent This is related to npm not being able to find a file.
34 verbose exit -2
I will be glad for any help!