Can not find js.map file? - javascript

I have a wordpress install and am working on building out a custom theme. But for some reason I keep getting a console 404 error saying that the [path to file]/waves.min.js.map is not found. I do not have a waves.js.map file nor do I kno what a .js.map file is.
The effect is still working and I am not having any issues related to the file. Can anyone tell me what would cause a .js.map or what it is or even how to make one?

This file is known as source maps you can read more about it here, you can disable this behavior by removing line //# sourceMappingURL=PATH_TO_waves.js.map from waves.js if waves.js doesn't come with this file.

Related

Images will load from ".html", but are not loading at run-time from the ".js" file when deployed to server

Please help me out. I have wasted all of the day trying to solve this problem. I couldn't, thats why I am asking for help here.
My images are loaded on run-time through javascript from "index.js" file. The images are shown when on localhost but when i build the project for the production, then the images that supposed to be load at run-time using the "index.js" file, will not be showing BUT if i put the same image in the ".html" file, it will load.
There are same queries in the past like this, and the answer to those queries here is that:
1- Github is case-sensitive so use all small letters
2- put ./ at the start or remove / from the url.
My problem is nothing like the above. It is something else. Here is the link to my github: https://github.com/Yasirkhan6499/tweet-personal
Please I need your help!!!

can't understand why my js file is not found on client console

this probably is a newbie question, please don't be mean :D
I'm trying to add a js file to an html page, but can't load it properly. It seems to be a path related issue.
in the HTML page I'm linking the file with
<script src="../src/utils/mapbox.js"></script>
Then on my js file I simply put a console.log to see if the file is loaded properly, but it isn't :/
I tried everything but nothing changes.
screenshot of the debug console
screenshot of the source tab of the debuggin tool
On the second image, I can't see all of my folders I have on VSCode. It is because those file are server side right? If so, how can I solve the issue? :/
this is the folder structure in VSCode
Thanks in advance.
The value of the src attribute needs to be a URL to the JS file.
If you use a relative URL, it needs to be relative to the URL of the HTML document.
This is not the same as the path between the EJS template used to generate the HTML and a JS file on the local filesystem.
First you need to give the JS file a URL. You haven't shown the source code you've written for your websever, but it seems like a reasonable assumption to say that you have used the Express.js static module to make the contents of the public directory accessible.
The src directory is not inside public so it isn't accessible. It also appears to be a directory containing your server-side source code, so it isn't a suitable place to keep your client-side JS.
Move the client-side JS files into a directory inside the public directory.
(If you are writing isomorphic JS then you could create a new directory, perhaps called shared, and expose it using static too).
Once that is done, you can work out the URL to the JS file.
ok I digged into that issue and so basically, I was confusing between client side and server side. I looked at the mapbox api docs and immediately I clicked on the npm quick guide, but this is just for limited cases, when you need to render a map on the server.
All I needed to follow was the web js api of the mapbox service.
So thanks for the comments, I'll try to noob less and study more! :)

PWA not finding javascript files in directories

I'm trying for a while now to create a PWA in Oracle APEX by following some instructions on http://vmorneau.me/apex-pwa-part4/, but I'm having no luck in certain parts.
I've installed the demo to test it and see what's wrong, but I'm having the same issues with the demo app, namely some important files not being detected/found when I run it. I thought I had configured something wrong previously, but this time it was supposed to work properly.
Example, I have the app.js inside the js directory in Apex:
When I run the app, I get these messages:
I tried checking the file path the same way I tried to see if the manifest.json file was in the proper root folder, and it couldn't be found:
This looks like a common problem I see on the forums, that doesn't relate to the PWA concept. You'll probably find the same thing if you tried to refer to static files loaded into the workspace.
See Morten's example regarding a fixing the configuration
https://ora-00001.blogspot.com/2016/12/apex-plugin-files-and-404-not-found-in-ords.html
Or placed your files in the middle tier, using /i/ (or preferrably a custom location /c/)

Eclipse JSDT autocomplete not working

I've done research and see this is a recognized issue. I guess my question will be: Is there a solution in Eclipse Mars or in Neon? Another plugin for JavaScript Content Assist?
I'm running Eclipse Mars and have a project with Java and JavaScript (uses ScriptEngineManager). JavaDoc/AutoComplete is working in Java but not in JS files. It Was working but then just stopped. I've restarted, rebooted, refreshed, rebuilt. No joy. The error reported is :
An exception occurred while getting the JSDoc. See log for details.
(in the log: ) file.js [in [in ...Workspace\.metadata\.plugins\org.eclipse.wst.jsdt.core\libraries\system.js]] does not exist
I deleted and re-defined the workspace. No joy. Mouseover the keyword Array and it does show system.jsArray with ECMA info. But mouseover String and it shows src/docs/jsString. "src/docs" is a path in my project.
I'm thinking it's just looking in the wrong place for the docs but I don't know where to set that. I've read that there is a bug where auto complete only works within a file. This seems to be consistent where it's still looking within the current file for the definition of everything.
I can get String to refer back to system.jsString if I add an invalid function. But if I fix the function it goes back to looking in my src/docs. Go figure.
Maybe the project structure is wrong (this is FOSS I got from Github). In the root of the project there are src/foo folders with packages and .java source, a reference to the JRE System Library, a couple .jars, and another src folder with src/docs/java with .java files and src/docs/js with .js files. Do I need to change the folder type of src or do something else to it so that it's recognized as a code folder? Right now it's in the project explorer with a common "folder" icon, not like one of the package source folders.
Do I need Neon? Do I need another IDE?
This suggestion to update the .project didn't help.
I'm going to try the package "Eclipse IDE for JavaScript and Web Developers" but I dont know if that will help with this Java/JS hybrid project. I'm also going to try Atom.
Thanks.

Combined JS File Using YUICompressor Causing Errors

I'm combining multiple js files using YUI Compressor. The command works successfully and outputs a combined file properly.
When I point my page to it, however, it doesn't seem to be read properly and I get this error in the Javascript error console.
YAHOO is not defined
I've tried using the --nomunge and --preserve-semi options but still get the same error.
Any ideas?
are you sure you're including the yahoo YUI js file before your script?
the variable YAHOO is defined within yui.js, so that script needs to exist and be loaded before you attempt to run any javascript that uses it.
Dave,
Hard to know what the problem is without a link to the compressed file.
You may also want to post those links to the dedicated YUI Compressor discussion forum on YUILibrary.com:
http://yuilibrary.com/forum/viewforum.php?f=94
Compressor's developers are there, as well as an interested community of fellow implementers.
-Eric
Did you try to jslint your code?
It may help you detect JS errors
It can usually be integrated in your IDE(I use Textmate), and warn you when you save your js file.
A poor man option is to use the online one at: http://www.jslint.com
Another option is to use a softer compression tool like jsmin to debug the problem. One is hosted here
You compress your files. Run your app, and usually your JS debugger will show you the problem.

Categories