I'm using Laravel 10.16.1 and MacOS. I have been trying to serve my nativePHP application for the first time using php artisan native:serve but I get this error:
Starting NativePHP dev server…
Fetching latest dependencies…
Starting NativePHP app…
ErrorException
file_get_contents(/home/user/processApp-native/vendor/nativephp/electron/src/Commands/../../resources/js/node_modules/electron/dist/Electron.app/Contents/Info.plist): Failed to open stream: No such file or directory
at vendor/nativephp/electron/src/Commands/DevelopCommand.php:65
61▕ * @return void
62▕ */
63▕ protected function patchPlist()
64▕ {
➜ 65▕ $pList = file_get_contents(__DIR__.'/../../resources/js/node_modules/electron/dist/Electron.app/Contents/Info.plist');
66▕
67▕ // Change the CFBundleName to the correct app name
68▕ $pattern = '/(<key>CFBundleName<\/key>\s+<string>)(.*?)(<\/string>)/m';
69▕ $pList = preg_replace($pattern, '$1'.config('app.name').'$3', $pList);
+14 vendor frames
15 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))'
It turned out that I need to use sudo before the command to run successfully