Giter Site home page Giter Site logo

Comments (19)

mraheelkhan avatar mraheelkhan commented on August 17, 2024 4

You need to enable corepack for node via running corepack enable in terminal.

If you are Node.js ^16.17 or >=18.6
corepack prepare yarn@stable --activate

I was able to run basic application after enabling corepack.

from laravel.

mpociot avatar mpociot commented on August 17, 2024 3

Yarn is now no longer used and we default to npm everywhere

from laravel.

Nielson avatar Nielson commented on August 17, 2024 1

I can confirm the same here. Latest MacOS, Macbook Air M1 running PHP through Herd.

from laravel.

Nielson avatar Nielson commented on August 17, 2024 1

You need to enable corepack for node via running corepack enable in terminal.

If you are Node.js ^16.17 or >=18.6 corepack prepare yarn@stable --activate

I was able to run basic application after enabling corepack.

This did it for me, however now i'm running in to this issue #16, so i'll move on from this thread :)

Thanks, @mraheelkhan !

from laravel.

Thihasoehlaing avatar Thihasoehlaing commented on August 17, 2024 1

You need to enable corepack for node via running corepack enable in terminal.

If you are Node.js ^16.17 or >=18.6 corepack prepare yarn@stable --activate

I was able to run basic application after enabling corepack.

That work for me. It is running now. But when native:install and native:serve, that only published NativeAppServiceProvider. I don't even get config file.

from laravel.

blessedjasonmwanza avatar blessedjasonmwanza commented on August 17, 2024

I can confirm the same. Yarn is run when starting NativePHP App. It has to be added to the documentation as a requirement.

from laravel.

joebenson avatar joebenson commented on August 17, 2024

Another confirmation here that Yarn seems to be required 👍

from laravel.

raulillana avatar raulillana commented on August 17, 2024

+1

from laravel.

Amorfx avatar Amorfx commented on August 17, 2024

In the command indeed they use yarn but I wonder if it's not just an error since for the install they use npm.

Process::path(__DIR__.'/../../resources/js/')
            ->env([
                'APP_PATH' => base_path(),
                'NATIVEPHP_PHP_BINARY_PATH' => base_path('vendor/nativephp/php-bin/bin/mac'),
                'NATIVEPHP_CERTIFICATE_FILE_PATH' => base_path('vendor/nativephp/php-bin/cacert.pem'),
                'NATIVE_PHP_SKIP_QUEUE' => $this->option('no-queue') ? true : false,
            ])
            ->forever()
            ->tty()
            ->run('yarn run dev', function (string $type, string $output) {
                if ($this->getOutput()->isVerbose()) {
                    echo $output;
                }
            });

from laravel.

mraheelkhan avatar mraheelkhan commented on August 17, 2024

@Amorfx , I found that last night and wanted to change yarn run dev into npm run dev to see the output.

from laravel.

Amorfx avatar Amorfx commented on August 17, 2024

@mraheelkhan I tried and then came across the issue : #27

from laravel.

galamz avatar galamz commented on August 17, 2024

I can confirm the same here. Latest MacOS, Macbook Air M1 running PHP through Herd.

+1

from laravel.

irsyadadl avatar irsyadadl commented on August 17, 2024

I have yarn installed. But when I try to run native:serve. It comes with errors.

error during start dev server and electron app:
Error: No electron app entry file found: /Users/irsyadadl/sites/desktop/vendor/nativephp/electron/resources/js/out/main/index.js
    at ensureElectronEntryFile (/Users/irsyadadl/sites/desktop/vendor/nativephp/electron/resources/js/node_modules/electron-vite/dist/chunks/lib-3592fc5a.js:26:23)
    at Object.startElectron (/Users/irsyadadl/sites/desktop/vendor/nativephp/electron/resources/js/node_modules/electron-vite/dist/chunks/lib-3592fc5a.js:120:5)
    at createServer (/Users/irsyadadl/sites/desktop/vendor/nativephp/electron/resources/js/node_modules/electron-vite/dist/chunks/lib-86ea98bb.js:74:21)
    at async CAC.<anonymous> (/Users/irsyadadl/sites/desktop/vendor/nativephp/electron/resources/js/node_modules/electron-vite/dist/cli.js:48:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Is there anyone have the same things and has solved the problem?

from laravel.

mraheelkhan avatar mraheelkhan commented on August 17, 2024

@irsyadadl , I remember someone posted a solution for this on other issues, maybe check this out #27
#27 (comment)

from laravel.

irsyadadl avatar irsyadadl commented on August 17, 2024

@irsyadadl , I remember someone posted a solution for this on other issues, maybe check this out #27 #27 (comment)

Alright, but this is will only temporary, isn't it. I don't think modify the vendor is legal 👯

from laravel.

mraheelkhan avatar mraheelkhan commented on August 17, 2024

@irsyadadl , Yes, that's correct, it's only a temporary fix so can give a shot to NativePhp. :-)

from laravel.

irsyadadl avatar irsyadadl commented on August 17, 2024

Thank you @mraheelkhan

from laravel.

joewardpr avatar joewardpr commented on August 17, 2024

Same issue. This didn't work:

corepack prepare yarn@stable --activate

I guess I'll come back in a few weeks after a few revisions and updates to the documentation. I see that Jordan Dalton was able to get it installed, but then several of the core features wouldn't work for him. So, alpha is alpha. Exciting, but hard to differentiate between user error on my/our part and what just might be the initial pains of a brand new alpha release.

from laravel.

mho22 avatar mho22 commented on August 17, 2024

+1

from laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.