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

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

Open
Ssionn opened this issue Jul 18, 2024 · 4 comments
Open

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

Ssionn opened this issue Jul 18, 2024 · 4 comments
Labels
bug Something isn't working windows

Comments

@Ssionn
Copy link

Ssionn commented Jul 18, 2024

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…


> [email protected] 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…


> [email protected] 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

@Ssionn Ssionn added the bug Something isn't working label Jul 18, 2024
@pkristian
Copy link

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

  • version "nativephp/electron": "^0.6.3" works fine
  • removing and redownloding all vendor and node_modules didnt help
  • sad noise

@munezaclovis
Copy link

This was fixed in NativePHP/electron#100

@umair982
Copy link

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

@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

5 participants