laravel: [Bug]: `native:build` command failed
What happened?
php artisan native:build command executed
laravel/sanctum … DONE
laravel/tinker … DONE
nativephp/electron … DONE
nativephp/laravel … DONE
nesbot/carbon … DONE
nunomaduro/termwind … DONE
then exit with this error “electron-vite: command not found”
How to reproduce the bug
- Install
php artisan native:install - build
php artisan native:buildthen exit with this error “electron-vite: command not found”
Package Version
0.2.0
PHP Version
8.1
Laravel Version
10.10
Node Version
14.20.1
Which operating systems does with happen with?
macOS
Notes
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 20 (5 by maintainers)
I tried then it throw errors like this
Error copying PHP binary Error: ENOENT: no such file or directory, stat '/Volumes/Projects/debugger/vendor/nativephp/php-bin/bin/mac/x64'Could not resolve "../../resources/php/php?asset&asarUnpack" from "src/main/index.js"With latest version nativephp/electron (0.3.2) I call:
php artisan native:build macIt generates me .dmg file. Also I copied vendor/nativephp/php-bin/bin/mac/arm64 to vendor/nativephp/php-bin/bin/mac/x64
Ok, I’ll put on new one!!! Thanks
That seems to be an error within electron-builder. Not sure what it means exactly, but it seems it might be bypass-able (if I’m interpreting the message correctly)
I’ll try to replicate it at some point and find a way to bounce past it, but it would be helpful to raise that as a separate issue as it’s off-track from this thread.
same here
error during build: RollupError: Could not resolve "../../resources/php/php?asset&asarUnpack" from "src/main/index.js" at error (file:///Users/ktech/code/phpnative/phpnative/vendor/nativephp/electron/resources/js/node_modules/rollup/dist/es/shared/node-entry.js:2245:30) at ModuleLoader.handleInvalidResolvedId (file:///Users/ktech/code/phpnative/phpnative/vendor/nativephp/electron/resources/js/node_modules/rollup/dist/es/shared/node-entry.js:24736:24) at file:///Users/ktech/code/phpnative/phpnative/vendor/nativephp/electron/resources/js/node_modules/rollup/dist/es/shared/node-entry.js:24698:26After a quick debugging, I am able to build the package for macOS. PHP binary for x64 was not present on the path it was looking for. Don’t know why it was not created automatically. I copied it from the Linux directory and paste it into the
macdirectory. And it works.