Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When building for Windows - The "path" argument must be of type string. #338

Open
ryanlovett-au opened this issue Aug 1, 2024 · 3 comments
Labels
bug Something isn't working windows

Comments

@ryanlovett-au
Copy link

ryanlovett-au commented Aug 1, 2024

What were you trying to do?

Doing a php artisan native:build win x64 generates a JavaScript error when executing electron-builder.js

What happened?

This error is generated:

image

How to reproduce the bug

I tracked the error down to this line in electron-builder.js

image

Commenting out the minify command, and re-building resulted in no errors being generated.

image

I then manually reverted this change from 0.6.3 -> 0.6.4 and it also built without issue.

image

Package Versions

0.6.4 & 0.6.5

PHP Version

8.3.8

Laravel Version

10.48

Node Version

21.7

Which operating systems have you seen this occur on?

Windows

OS version

Win10

Notes

No response

@ryanlovett-au ryanlovett-au added the bug Something isn't working label Aug 1, 2024
@simonhamp
Copy link
Member

Hmm... I'm not sure it is the minify command that's the problem... I think that may be a red herring due to how the CLI output on error is handling the different try-catch blocks.

The error in your first screenshot references vendor\nativephp\electron\resources\js\php.js somewhere around line 55. The throw that happens there is to do with unzipping the relevant php binary from the nativephp/php-bin package.

My guess is that it can't find the file when trying to run the unzip but on a later pass, it was in the right place. This suggest some variability in the behaviour of composer install when running the build.

I will need to do some further testing to work out why it's not in the right place at that point in time - it should be 🤷🏼

@simonhamp
Copy link
Member

Related to #336 ?

@simonhamp
Copy link
Member

Please update to the latest versions of NativePHP's dependencies and try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

No branches or pull requests

2 participants