I have installed a fresh instance of laravel with inertia and jetstream. But soon I hit npm run dev I end with the following error. Before this on my older project I use webpack and got the same error but somehow fixed that using .disableNotification(); in webpack.
Please help me solve this issue. I am using iMac M1 chip. Laravel version 8.75
Compiled with some errors in 910.02ms
[webpack-cli] Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:420:11)
at spawn (node:child_process:757:9)
at Object.execFile (node:child_process:348:17)
at module.exports.fileCommandJson (/Users/vasudev/projects/aditya/admin/node_modules/node-notifier/lib/utils.js:88:13)
at NotificationCenter.notifyRaw (/Users/vasudev/projects/aditya/admin/node_modules/node-notifier/notifiers/notificationcenter.js:81:11)
at WebpackNotifierPlugin.compilationDone (/Users/vasudev/projects/aditya/admin/node_modules/webpack-notifier/index.js:129:14)
at _next1 (eval at create (/Users/vasudev/projects/aditya/admin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:39:1)
at eval (eval at create (/Users/vasudev/projects/aditya/admin/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:63:1)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -86,
code: 'Unknown system error -86',
syscall: 'spawn'
}```
It looks like you are running into an issue with the node-notifier package. This package is used to send notifications to the user when certain events occur. It looks like the issue is related to the M1 chip, as this package is not yet compatible with it.
You can try disabling the notifications by adding the following line to your webpack config file:
plugins: [
new WebpackNotifierPlugin({
disableNotifications: true
})
]
This should disable the notifications and allow you to run the command without any errors.