Comments (19)
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.
Yarn is now no longer used and we default to npm everywhere
from laravel.
I can confirm the same here. Latest MacOS, Macbook Air M1 running PHP through Herd.
from laravel.
You need to enable
corepack
for node via runningcorepack 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.
You need to enable
corepack
for node via runningcorepack 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.
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.
Another confirmation here that Yarn seems to be required 👍
from laravel.
+1
from laravel.
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.
@Amorfx , I found that last night and wanted to change yarn run dev
into npm run dev
to see the output.
from laravel.
@mraheelkhan I tried and then came across the issue : #27
from laravel.
I can confirm the same here. Latest MacOS, Macbook Air M1 running PHP through Herd.
+1
from laravel.
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.
@irsyadadl , I remember someone posted a solution for this on other issues, maybe check this out #27
#27 (comment)
from laravel.
@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.
@irsyadadl , Yes, that's correct, it's only a temporary fix so can give a shot to NativePhp. :-)
from laravel.
Thank you @mraheelkhan
from laravel.
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.
+1
from laravel.
Related Issues (20)
- Websockets package doesn't support Laravel 11 HOT 4
- [Bug]: Class "Imagick" not found HOT 1
- Menu is not working in Linux? HOT 3
- Jobs table HOT 4
- `php artisan native:serve` hangs (Windows 11) HOT 6
- Add `xmlwriter` extension HOT 1
- Is there anyway sync data between remote sqlite and local sqlite
- Scheduled Commands HOT 3
- The windows built app shows nothing, (using nativphp/electron `v0.6.3`) HOT 6
- Building for Windows on arm64 Mac fails HOT 1
- Windows moving and relocated HOT 4
- The SUID sandbox HOT 1
- Update Not work HOT 1
- Feature MenuBar don't work in linux HOT 1
- Class "ZipArchive" not found HOT 3
- Unable to set the minimum window size HOT 2
- "path" argument must be of type string. HOT 3
- When building for Windows - The "path" argument must be of type string. HOT 2
- Maximize on MacOs doesn't work HOT 1
- Building app fails when there are spaces in the APP_NAME field of the .env file HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel.