Magento - frontend and backend don't have js files - javascript

I installed the magento2 project for the first time.
I installed the "luma" template and made the following commands:
bin/magento sampledata:deploy
bin/magento setup:upgrade
bin/magento deploy:mode:set developer
php bin/magento setup:static-content:deploy -f
Unfortunately, I still have a problem with reading js files on the front (both frontend and backend).
GET http://magento.local/static/version1547468917/frontend/Magento/luma/en_US/mage/requirejs/mixins.js net::ERR_ABORTED 404 (Not Found)
(index):22 GET http://magento.local/static/version1547468917/frontend/Magento/luma/en_US/requirejs/require.js net::ERR_ABORTED 404 (Not Found)
(index):25 GET http://magento.local/static/version1547468917/frontend/Magento/luma/en_US/mage/polyfill.js net::ERR_ABORTED 404 (Not Found)
(index):23 GET http://magento.local/static/version1547468917/frontend/Magento/luma/en_US/mage/requirejs/mixins.js net::ERR_ABORTED 404 (Not Found)
(index):25 GET http://magento.local/static/version1547468917/frontend/Magento/luma/en_US/mage/polyfill.js 404 (Not Found)
(index):65 Uncaught TypeError: require.config is not a function
at (index):65
I've tried different solutions. Can any of you help me? This is my first magento project.

Related

Wrangler Pages file not found when serving a Qwik website

Wrangler version: 8.19.1
OS: Ubuntu 22.04.1 LTS
Bug
In my Qwik pages project, when running npm run build && npm run serve, some files failed to be found:
Full DevTools console output
127.0.0.1/:1
GET http://127.0.0.1:8788/build/q-8b482804.css net::ERR_ABORTED 404 (Not Found)
127.0.0.1/:1
GET http://127.0.0.1:8788/build/q-9f65a413.css net::ERR_ABORTED 404 (Not Found)
127.0.0.1/:1
GET http://127.0.0.1:8788/build/q-e6eff275.css net::ERR_ABORTED 404 (Not Found)
127.0.0.1/:1
GET http://127.0.0.1:8788/build/q-03a2bd7f.css net::ERR_ABORTED 404 (Not Found)
favicon.ico:1
GET http://127.0.0.1:8788/favicon.ico 404 (Not Found)
A bad HTTP response code (404) was received when fetching the script.
(index):3 TypeError: Failed to register a ServiceWorker for scope ('http://127.0.0.1:8788/') with script ('http://127.0.0.1:8788/service-worker.js'): A bad HTTP response code (404) was received when fetching the script.
Full terminal output
npm run serve [14:02:45]
> serve
> wrangler pages dev ./dist
🚧 'wrangler pages <command>' is a beta command.
Compiling worker to "/tmp/functionsWorker-0.3009066340734492.js"...
Compiled Worker successfully.
â–² [WARNING] Passing --inspect is unnecessary, now you can always connect to devtools.
Starting inspector on 0.0.0.0:9229 failed: address already in use
GET / 200 OK (28.51ms)
GET /build/q-8b482804.css 404 Not Found (99.78ms)
GET /build/q-9f65a413.css 404 Not Found (69.33ms)
GET /build/q-e6eff275.css 404 Not Found (57.81ms)
GET /build/q-03a2bd7f.css 404 Not Found (57.55ms)
GET /service-worker.js 404 Not Found (53.69ms)
GET /favicon.ico 404 Not Found (61.71ms)
To try and fix this, I have updated entry.cloudflare-pages.tsx to use the new createQwikCity instead of the now deprecated qwikCity but this hasn't changed anything.
I've tried running npm run build.server before the serve, but no success either
I've double checked and the files are indeed inside my ./dist folder, they just fail to be found without further explanation.
FYI when running npm run dev my website works as expected

Error while importing JQuery library net::ERR_Aborted 404

Working on a Java project in eclipse ide. I downloaded and added jQuery library in my Web/module_name/WebContent/js folder. In my code I have imported the file as:
<script src="/module_name/js/jquery-1.12.4.js"></script>
When I run the server, I am getting error as net::ERR_Aborted 404 and the address in the error line is showing as:
GET http://localhost:8080/module_name/js/jquery-1.12.4.js net::ERR_ABORTED 404

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8000/screen

I have been trying to run this apps, but when I try to run, the error appears like this. I don't know how to solve it.

Failed to load resource: the server responded with a status of 404 (Not Found) showing in jQuery console( icon-1.png,icon-2.png,icon-3.png,icon-4.png)

I am creating a web application where I have to add jQuery version 3.2.1. I have not installed JQuery-UI. But in the console the following error message is showing 4 times:
Failed to load resource: the server responded with a status of 404 (Not Found)
Every error contains icon-1.png missing at the right side and gradually icon-2.png to icon-4.png.
I have clicked the link but it is showing under image directory 4 icons are missing but there is no image folder in my directory.
I have searched my problem but in many solution they are saying jquery-ui have missing image. But I have not installed jQuery-ui. So, none of the answer solved my problem.
Thanks in advance.

Angularjs libs Failed to load resource: the server responded with a status of 404 (Not Found)

Hello guys ı am new with angular.js and checked alot of possible solutions but it didnt work.
I add them as same in the ı saw in the project
they are all in the vendor Directory
script src="vendor/angular.js"></script
script src="vendor/angular-strap.js"></script
and when ı click Ctrl and mouse it sees the files and it can be opened so their positions are right , but the project cant see them. Thank you
ı tried a lot things like ../../ but didint work, do you think the Gulp can be broken but it works correctly
I cant give image cuz of having less then 10 post. But Errors like:
http://localhost:****/vendor/angular-cookies.js
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:63342/app.js
Failed to load resource: the server responded with a status of 404 (Not Found)
it gives the error all angular libs and my files like app.js, style.css, show.js
Thank you so much.
The most simple solution is to set a base path:
<base href="http://localhost/myproject">

Categories