Deploying React in Github page - Failed to load resource: the server responded with a status of 404 - css

I'm making React App.
Firstly, I'm making deployment on GH page with SASS and now I have this problem. Can anybody tell me how to fix this?
I don't know which code exactly I have to add , so just tell me what part of code i nee to add.
page with error

I think you should set the homepage property inside your package.json
Read this : https://create-react-app.dev/docs/deployment/#building-for-relative-paths
It's because your website isn't at the domain's root.

Related

No match found for location with path - Vue 3 + Vue Router 4

I need to create routes dynamically within a Vue application. I have created a basic component on this code sandbox link.
The issue that I am encountering is that on first load the home page is returning a 404, even though the route has been added within the created() lifecycle of the app. I understand that the issue with this is that the navigation is triggered before app creation and therefore that is why when navigating on the app, the navigation resolves itself.
On my higher scale application, the error returned is (not showing on Sandbox because the Not Found page is defined):
[Vue Router warn]: No match found for location with path "/"
Please do not provide solutions that include adding the routes upon initialising the VueRouter because I specifically need to add them in the created() lifecycle of the app since the data I will be receiving will be from an API and I would need to handle it there.
I have tried using navigation guards but I have not managed to solve the issue as of yet.
Let me know what I am doing wrong and how I can go around solving this issue please. Any help is greatly appreciated.
Thanks in advance.
Good day to you all. :)
You need to trigger a new navigation after the route is added: https://next.router.vuejs.org/guide/advanced/dynamic-routing.html#adding-routes
i have met this problem too when i try to generate dynamic routes ,what i found is
when enter a route what i not register yet will go to this error , so you need to register a 404 page to wait our routes registered register a 404 route
hope to help u
In your /router/index.js, please add the following code after the declaration of const router:
router.addRoute('admin', { path: 'settings', component: AdminSettings })
Here you can just replace 'admin' with your own parent path;
set 'settings' as the child path;
and the component as the child component that you want.
Refresh your page then you can see the component AdminSettings with the URL like: localhost:5713/admin/settings .
Hope this helps. https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-nested-routes
I think you need store full path in local storage in router guard when page change, then get this path to redirect when app created.

Failed to load resource: the server responded with a status of 404 () using Angular, deploying with GitHub Pages

I am trying to deploy my first website using Angular and Github Pages. It deploys successfully, but I get the console error "Failed to load resource: the server responded with a status of 404 ()" at "home: 1", "home" referring to my home page component. I have noticed that all aspects of my webpage seem to be working except for the app.component.css file. My website works perfectly when run locally, and when deployed, all my other CSS files are working just fine. I have searched all over the internet, but I cannot seem to find a solution to this problem. Thank you!
If you’re deploying the project to a Github project page you’ll need to set the baseHref property as the repository name. The baseHref will be used for all relative URLs on your site. You could specify the baseHref as part of the project architect deploy options in the angular.json file. Or just pass it as the --base-href flag to the ng deploy command.
Also, I hope you referred official page to mitigate the issue - https://angular.io/guide/deployment#deploy-to-github-pages

How to copy a package to Node_Modules through manually in angular-2

After copying the package to node_modules i am getting 404 error. Even i specified in package.json in dependencies...
Plz help me to fix this thing. Thank you.
In developer tool
Request URL:http://localhost:3000/ng2-pdf-viewer
Request Method:GET
Status Code:404 Not Found
So, node modules are libraries that add functionality to your application. Angular has no way to know that you intend to make that functionality available at a given URL unless you code it to do so.
On the ng2-pdf-viewer GitHub page, scroll down to the Usage section to see an example of how they are implementing that in a custom component.
Essentially, you need to create a component in Angular, add that component to the router for the URL you want, and then code in the ng2-pdf-viewer functionality like in the example. You can read more about how Angular routing works here: https://angular.io/guide/router

2sxc: 404 Error after adding App module on the page. API is missing?

I have a problem when placing an App module(v 8.4.8) on a page. When I placed an App module on a page I got a pop up saying "Had an error talking to the server (status 404). if you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug".
This error happens on whatever action I try to do: trying to add and app, refresh page etc.
I checked a communication to the server using Firebug and seems that one of APIs are missing:
~/desktopmodules/2sxc/api/view/Module/GetSelectableApps
Referer: ~/desktopmodules/tosic_sexycontent/dist/dnn/ui.html?sxcver=8.4.8.19191
Did I missed something? Should I make some configuration after SexyContent module install (v 8.4.8)?
I just checked a video by Daniel Mettler where he showed how to install a module and seems that process is simple. Nothing to worry about.
Does anybody has any idea what might went wrong here?
The same actually happens when I install and Content module: Error about missing APIs:
~/desktopmodules/2sxc/api/view/Module/GetSelectableContentTypes
~/desktopmodules/2sxc/api/view/Module/GetSelectableTemplates
Thanks a lot for your time
My best guess is that it's an issue with the dnn domain/path configuration. So basically my guess is that
you have multiple domains, and if this is configured incorrectly, the paths in the js-calls won't fully match the original one
you have sub-portal (with paths like /products/) or something, and this isn't configured correctly in dnn
languages in portal-paths are causing similar issues.
So please compare EXACTLY the full base path and see if that's the issue.

Prestashop Smarty Cache css file path error 404

I have console error -> file not found 404 -> this is a cache css file with path error.
/themes/default-bootstrap/cache/v_37_aed4c0aa657ac1142332692bc74511ed_all.css
Using inspector i have added "prestashop" and now Prestashop css is ok.
prestashop/themes/default-bootstrap/cache/v_37_aed4c0aa657ac1142332692bc74511ed_all.css
Notice Prestashop js file path is correct
How can i correct this error ?
path error
path ok using inspector
Login to admin panel and visit Advance parameters --> Performance. On top right corner there is button Clear Cache, by clicking that cache will be cleared and your site should work I think.
You may have configured shop wrongly. In back office go to Preferences -> SEO& URLs and do the following changes.
Shop URL: 192.168.1.128:8080
Base : /preshtashop/
Then clear your cache and enable it and look again.
It is a Prestashop v1.6.1.5 bug, it should be solved in v.1.6.1.6
See the changelog (https://www.prestashop.com/en/developers-versions/changelog/1.6.1.6-stable):
[-] FO : (c0ee6b7) Fix CSS 404 when using subdirectory

Resources