problem laravel in resources js app.js not found - laravel-9

I install websockets,pusher js , echo, and do every thing in the laravel docs
but i have a problem
GET http://127.0.0.1:8000/resources/js/app.js net::ERR_ABORTED 404 (Not Found)
I try to remove file from resources location to public but have the same problem

Related

Deploying vite vue.js app with vue router to GitHub Pages with search engines support

I am deploying my website powered by vue vith vue-router(history mode) to gituhb pages using vite builder.
So I got a problem: Github Pages is returning 404 error each time I reloading the page with non-root path.
Adding cp dist/index.html dist/404.html seems like solution. The page is displaying correctly but GitHub is returning 404 status. And this is an important problem because search engines skipping paths in my sitemap.xml that returns 404 status code. That is, all non-root paths.

Direct nested URL fails with error "Uncaught SyntaxError: Unexpected token '<'" - Create React App/React-router-dom/Netlify

I've got an app created with create-react-app (with react-router-dom) and deployed with Netlify. Whenever I try and route to a page through a direct (nested) URL, such as 'https://jvcparry.com/products/indie', it fails to load a page and gives the errors
Uncaught SyntaxError: Unexpected token '<' main.e3eaf229.chunk.js:1
However when I navigate the deployed version through links, everything loads fine. I also don't get this error when I'm running the app locally, which I guess means it must be something to do with deployment?
I've trawled through all the other posts I can find with this error, and also things to do with Netlify/CRA deployments. I've got a _redirects file with '/* /index.html 200' in it in my /public folder, and I've tried refactoring my routes to use code-splitting but that's made no difference.
My code is on github here: https://github.com/NatClamp/jvcparry
Deployed version is here: https://jvcparry.com/
and if you go to https://jvcparry.com/products/indie you'll see the error I'm getting.
Can anyone shed any light on this? Thanks in advance
A rigid but working solution is to update _redirects file this way:
/*/main.e3eaf229.chunk.js /main.e3eaf229.chunk.js 200
/* /index.html 200
You can also be updating this file every time you build new js bundle during your CICD run

express static with multiple routes returning 404

I'm serving up two create-react apps.
This works navigating to localhost:9000/
app.use('/', express.static(path.join(__dirname, APP_STATIC_PATH)));
But this doesn't work when I navigate to localhost:9000/app
app.use('/app', express.static(path.join(__dirname, APP_STATIC_PATH)));
I get a bunch of net::ERR_ABORTED 404 (Not Found) for all my .css and .js files
How can I change the create react app public url to point to the correct static dic?
In case anyone's running into the same problem.
In package.json you can set your homepage:'/app' and create react-app will use that on yarn build.

Statically served vue-router app by Flask shows 404 for custom pages on Heroku

I've gone through several Stack Overflow pages and the official Vue guide, but my app still returns 404 results when going to a different page.
The structure of my app looks like this, with a client folder that has the Vue app and a server folder containing app.py that statically serves the index.html in the client/dist folder through Flask.
Contents of static.json are as outlined in the guide:
{
"root": "client/dist",
"clean_urls": true,
"routes": {
"/**": "index.html"
}
}
with just modified root folder to go to client/dist. Running the app locally with npm run serve works, as does opening it up on its Heroku page and clicking on the nav. However, directly going to a page, such as /translate, always returns 404.
I have installed the following buildpacks:
=== readiglot Buildpack URLs
1. heroku/nodejs
2. heroku/python
3. https://github.com/heroku/heroku-buildpack-static
The app is hosted here: https://www.readiglot.herokuapp.com.
On npm run build from the root directory, the dist folder is built by Heroku in the client folder.
Am I missing something? Could anyone advise as to additional configuration?
The answer is in the app.py file - you need to statically serve the file using a catch all route.
#app.route("/", defaults={"path": ""})
#app.route("/<string:path>")
#app.route("/<path:path>")
def index(path):
return app.send_static_file("index.html")
By putting the serve_static_file in the Flask app to redirect from all other routes, 404 only shows up on a true 404.

Deployed Vue app managed with 'webpack-simple' doesn't work

I'm working on my first Vue app, which uses the Moment library and Firebase (if that matters). I use default Webpack simple. To deploy the app I did npm run build.
But when opening directly index.html (the app is deployed here) I get "Failed to load resource: the server responded with a status of 404 (Not Found)" error message and the app doesn't work at all as a result.
I have no idea how to troubleshoot this issue since there's no more information that this in DevTools...
Any idea about what I can do next?
App source code
Remove the first forward slashes of all your assets path.
It should fix your problem.
<script src="/dist/build.js"></script> // No!
<script src="dist/build.js"></script> // Yes!
Vue adds it by default during the build process, in order to make your assets relative to the root folder.