NativePHP / laravel

Laravel wrapper for the NativePHP framework
https://nativephp.com
MIT License
3.2k stars 166 forks source link

Building with `APP_NAME=Laravel` cause error #149

Open IvanSerpa opened 1 year ago

IvanSerpa commented 1 year ago

What happened?

The executable generated by php artisan native:build linux only renders the generic "500 SERVER ERROR" page. php artisan native:serve renders the page correctly. Changing APP_NAME in .env to anything other than "Laravel" bypasses the issue and the page renders correctly.

How to reproduce the bug

Fresh install of Laravel. Fresh install of NativePHP. Leave APP_NAME=Laravel in .env file. Run php artisan native:build linux. Run the executable.

Package Version

0.3.3

PHP Version

8.2.8

Laravel Version

10.17.1

Node Version

20.4.0

Which operating systems does with happen with?

Linux

Notes

Changing debug to true in config/app.php makes the executable generated by php artisan native:build linux work even with APP_NAME=Laravel, and it doesn't show any errors.

simonhamp commented 4 months ago

@IvanSerpa I've not been able to reproduce this. Does it still occur for you?

Dalovec commented 3 months ago

@simonhamp I've actually encountered that hot reloading doesn't work if the App name is Laravel. So there might be something to this. Reproduction:

With blade changes (html content) you must restart the dev server and css/js doesn't actually change unless you run npm run build. If you change the app name suddenly everything works as intended.

simonhamp commented 1 day ago

@Dalovec I'm not able to reproduce what you're seeing, but that feels like a separate issue to me.

@IvanSerpa for production builds, 500 errors should get logged into [APPDATA]/storage/logs/* - do you see any errors there?