Error while importing JQuery library net::ERR_Aborted 404 - javascript

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

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

ERR_ABORTED for Javascript message in the console

My Javascript code keeps showing this error in the console when I load my html page. I'm trying to import some Javascript code in VScode, through an app module so that I may reuse the code.
I'm running my code through localServer.
Error:
GET http://127.0.0.1:5500/js/js/slider net::ERR_ABORTED 404 (Not Found)
app.js:
import slider from './js/slider'
new slider();
Where is your app.js located?
If it is located in "js" directory, replace the 1st line of your app.js into below.
import slider from './slider';
404 response code means "requested file is not found".

Referring Local JS file dynamically in angular8

I'm trying to refer js files located in my project on selecting a page in menu.
I'm getting error that the JS is not found. The below is the error message.
http://localhost:57158/Js/flowchart.js net::ERR_ABORTED 404 (Not Found)
Kindly suggest

Magento - frontend and backend don't have js files

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.

Jhipster - 404 error on app.js when running in prod profile

I have a problem running my jhipster application in prod. After the deployment of prod war file the site is unable to load due to a 404 not found on /app/app.js
However vendor js and css are correctly injected. Not sure what's causing this issue.
Error message :
Failed to load resource: the server responded with a status of 404 (Not Found)
generated.js:19530
Uncaught TypeError: Cannot read property 'module' of undefined(…)
http://localhost:9080/app/app.js
Failed to load resource: the server responded with a status of 404 (Not Found)
Error as seen in the browser's console:
did you also build your app for prod? it looks like your app did not build the client site. This is done actually wiht the gulp build command. Depending on your build system maven or gradle you can specify the prod environment for the build phase, e.g. for maven mvn -Pprod package.
The gulp build command will be automatically executed durring the build phase. In the doc you can find more information about how to use JHipster in production.

Categories