NativePHP / laravel

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

"path" argument must be of type string. #336

Open Ssionn opened 1 month ago

Ssionn commented 1 month ago

What were you trying to do?

I was trying to start up the development server.

What happened?

It should've started the development server. but instantly failed.

How to reproduce the bug

run php artisan native:serve

result:

➜  code-editor git:(production) ✗ art native:serve

  Starting NativePHP dev server… 

 Fetching latest dependencies…

 Installing NPM dependencies (This may take a while)...

 Installing NPM dependencies using the npm package manager...

 Fetching latest dependencies…

> Laravel@1.0.0 postinstall
> node ./node_modules/electron-builder/cli.js install-app-deps

  • electron-builder  version=24.13.3
Arch:  x64
Platform:  linux
  • loaded configuration  file=/home/ssionn/Documents/GitHub/code-editor/vendor/nativephp/electron/resources/js/electron-builder.js

up to date, audited 619 packages in 2s

96 packages are looking for funding
  run `npm fund` for details

2 high severity vulnerabilities

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

 Starting NativePHP app

 Running the dev script with npm...

 Fetching latest dependencies…

> Laravel@1.0.0 dev
> cross-env node php.js && electron-vite dev --watch

node:internal/errors:541
      throw error;
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean (false)
    at join (node:path:1175:7)
    at Object.<anonymous> (/home/ssionn/Documents/GitHub/code-editor/vendor/nativephp/electron/resources/js/php.js:53:22)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v20.15.1

Package Versions

^0.6.4

PHP Version

v8.3.6

Laravel Version

v11.16.0

Node Version

v20.15.1

Which operating systems have you seen this occur on?

Linux

OS version

Kubuntu 24.04 LTS x86_64

Notes

No response

pkristian commented 1 month ago

Package Versions

^0.6.4 (nativephp/electron)

PHP Version

v8.3.6

Laravel Version

v10.48.15

Node Version

v20.15.0

Which operating systems have you seen this occur on?

Windows 11 Pro

Notes

munezaclovis commented 1 month ago

This was fixed in NativePHP/electron#100

umair982 commented 3 weeks ago

Now working on window . when running: php artisan native:serve

it start to install npm dependencies etc then stops. and i tried php artisan native:build win it successfully worked but when opened dist folder there was a exe, tried to install app, seemed like app installed. but when i tried to open that app nothing happened