Issue loading assets #1085
Replies: 7 comments 3 replies
-
Hello @mona09209 If you set prod, check "APP_URL" in your .env file. If you are using https also make sure you write it down in app url. Then clean with
In case this didnt work, check permissions and repeat the clean again:
And take a look in you error logs and the URLs in the network tab. Cheers. |
Beta Was this translation helpful? Give feedback.
-
Hey @mona09209 please open the browser console and check the network tab for the file loading error. Check the url where the browser is trying to load the files. Does it match the same APP_URL in your So for example, if you website is loading via Another thing you could try is to run a Let me know if that helps. Cheers |
Beta Was this translation helpful? Give feedback.
-
What i deploy the project and edit the .env file but basset still not
fetching
…On Thu, Jul 18, 2024, 11:42 AM Pedro Martins ***@***.***> wrote:
Hey @mona09209 <https://github.com/mona09209>
please open the browser console and check the network tab for the file
loading error.
Check the url where the browser is trying to load the files. Does it match
the same APP_URL in your .env file ?
So for example, if you website is loading via php artisan serve, most
likely is running on 127.0.0.1:8000 so in your in your .env file make
sure you have APP_URL=http://127.0.0.1:8000
Another thing you could try is to run a php artisan basset:check. Please
make sure your webserver is running before running that command. So if you
use php artisan serve to launch the webserver you will need to open
another console window to run that command while the server is running on
the other.
Let me know if that helps.
Cheers
—
Reply to this email directly, view it on GitHub
<#1085 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ6NPXYNISGZIFVKPEPBFPTZM6EY3AVCNFSM6AAAAABK76Y6BSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBYGI2TSNQ>
.
You are receiving this because you were mentioned.Message ID:
<Laravel-Backpack/community-forum/repo-discussions/1085/comments/10082596@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Cpanel .. if you don't have access to ssh it will be tricky to deploy any Laravel project, not only Backpack specific. If you do have access to ssh, make sure your storage is linked with If you don't have access to ssh, you need to run What are you using to deploy to prod ? Fetch from github repo and run some commands like Cheers |
Beta Was this translation helpful? Give feedback.
-
Let me explain to what i did:
1) After completed the design of front pages
2).I changed the .env settings to:
a)App_URL:https://rental.etoolabs.com
b)App_env: production
c)App_debug: false
3)Then I upload the project to cpanel host which has ( GUI ) and did
multiple commands on cpanel terminal:
php artisan optimize:clear
php artisan basset:clear
php artisan basset:cache
php artisan optimize
Php artisan storage: Link
Php artisan basset: check
Finally I got error on fetching basset even when I edit the permission for
storage directory and bootstrap.
…On Thu, Jul 18, 2024, 5:49 PM Pedro Martins ***@***.***> wrote:
Cpanel .. if you don't have access to ssh it will be tricky to deploy any
Laravel project, not only Backpack specific.
If you do have access to ssh, make sure your storage is linked with php
artisan storage:link, that php artisan basset:check command passes all
green.
If you don't have access to ssh, you need to run php artisan basset:cache
on your local machine so that the assets are generated on local, and then
copy those assets to your cpanel instance.
What are you using to deploy to prod ? Fetch from github repo and run some
commands like composer install --no-dev etc ?
Cheers
—
Reply to this email directly, view it on GitHub
<#1085 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ6NPXYOYN6HDJTQRBZAY3TZM7PYLAVCNFSM6AAAAABK76Y6BSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBYGY2DMMI>
.
You are receiving this because you were mentioned.Message ID:
<Laravel-Backpack/community-forum/repo-discussions/1085/comments/10086461@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
The problem solved by installing node.js in project root directory.
Thanks you all for your help 🙏!
Cheers,
…On Fri, Jul 19, 2024, 4:58 PM Pedro Martins ***@***.***> wrote:
And when you run basset:check, what was the error ?
After you run php artisan basset:cache do you have your files in
public/storage/basset ? If you can't find storage in your public folder
it means the symlink is not properly created. re-create it again, and if
the issue persist ask your host for a solution.
Just another heads up, your storage:link must be created automatically
before the basset:cache command, otherwise basset won't be able to write
to that directory.
Alternatively, if you can't link the storage directory you can create a
new basset disk pointing to your public folder directly.
// in your `config/filesystems.php` file
'bassetDisk' => [
'driver' => 'local',
'root' => public_path(''),
'url' => '/',
'visibility' => 'public',
'throw' => false,
],
// in your .env file: BASSET_DISK=bassetDisk
This way you shouldn't need a symlink if that's the issue in your case.
Please, if you need my further assistance I need you to start providing
more information, screenshots with the errors (paint the confidential
information), what you tried etc.. at the moment I am just blind guessing,
hope I am good at it 😃
Cheers
—
Reply to this email directly, view it on GitHub
<#1085 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQ6NPX4X5WUJCS4LSLWG33DZNESRFAVCNFSM6AAAAABK76Y6BSVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMBZGY3TGMI>
.
You are receiving this because you were mentioned.Message ID:
<Laravel-Backpack/community-forum/repo-discussions/1085/comments/10096731@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
Im glad you solve the problem. I will close the issue, but please feel free to re-open or create a new one if needed. Cheers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
After uploaded My project to cpanel I got error in fetching basset and this is my work look like the image given so how to fix this I tried a lot of methods but nothing changed plus i edit the .env file for production and did the commands like clearing basset cache, optimize, config,...
Beta Was this translation helpful? Give feedback.
All reactions