Cannot read property of 'fn' of undefined? - javascript

Getting these error codes on my github pages. I have these as my order of loading scripts:
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/index.js"></script>
Here are the error messages:
GET https://tmolano.github.io/CareerMod4/node_modules/jquery/dist/jquery.js 404 ()
index.html:115 GET https://tmolano.github.io/CareerMod4/node_modules/popper.js/dist/popper.min.js 404 ()
util.js:56 Uncaught TypeError: Cannot read property 'fn' of undefined
at util.js:56
at util.js:10
at bootstrap.min.js:6
at bootstrap.min.js:6
(anonymous) # util.js:56
(anonymous) # util.js:10
(anonymous) # bootstrap.min.js:6
(anonymous) # bootstrap.min.js:6
Heres my page: https://tmolano.github.io/CareerMod4/
Other than the order of loading, what else could be causing this?

Possible reasons for this error:
Uncaught TypeError: Cannot read property 'fn' of undefined
invalid reference to the file addresses or missing files (Your case).
Duplicate reference to the Jquery.
Overriding $ sign of Jquery in 3rd party libraries.
Using Jquery functions before inserting Jquery (Not your case).
Using deprecated syntax for load,error,unload on WINDOW element in jquery without on

Related

Why my css isn't working and shows problems in console

Hello my css is not working while it was working 5 minutes ago, i don't really know what's the problem, and i had this error in console :
bootstrap.min.js:6 Uncaught TypeError: Cannot read property 'fn' of undefined
at bootstrap.min.js:6
at bootstrap.min.js:6
at bootstrap.min.js:6
at bootstrap.min.js:6
(anonymous) # bootstrap.min.js:6
(anonymous) # bootstrap.min.js:6
(anonymous) # bootstrap.min.js:6
(anonymous) # bootstrap.min.js:6
DevTools failed to load source map: Could not parse content for http://localhost:8080/GRH/home/assets/js/bootstrap.min.js.map: Unexpected end of JSON input
Network shows everything is fine
even the linking and paths are good
Go download JQuery , just choose the compressed script
then before your bootstrap script, just insert jquery script before it
Clear Chrome Cache by "Ctrl+Shift+R", if it doesn't work, open your website in incognito tab. Maybe it will work.

firebase-app.js not loading shows net::ERR_CONTENT_DECODING_FAILED 200 (OK)

I am trying to make a website with a booking form which stores the data in firestore. But I am getting error on loading firebase. The error is given below.
GET http://localhost:5000/__/firebase/8.2.1/firebase-app.js
net::ERR_CONTENT_DECODING_FAILED 200 (OK)
There are several more errors like:
index.ts:79 TypeError: Cannot read property 'INTERNAL' of undefined
at index.ts:41
at index.ts:79
at firebase-analytics.js:1
at firebase-analytics.js:1 (anonymous) # index.ts:79 (anonymous) # firebase-analytics.js:1 (anonymous) # firebase-analytics.js:1
index.ts:79 Uncaught Error: Cannot instantiate firebase-analytics.js -
be sure to load firebase-app.js first.
at index.ts:79
at firebase-analytics.js:1
at firebase-analytics.js:1 (anonymous) # index.ts:79 (anonymous) # firebase-analytics.js:1 (anonymous) # firebase-analytics.js:1
init.js:1 Uncaught Error: hosting/init-error: Firebase SDK not
detected. You must include it before /__/firebase/init.js
at init.js:1 (anonymous) # init.js:1 index.ts:38 TypeError: Cannot read property 'SDK_VERSION' of undefined
at version.ts:21
at index.ts:38
at firebase-firestore.js:1
at firebase-firestore.js:1 (anonymous) # index.ts:38 (anonymous) # firebase-firestore.js:1 (anonymous) # firebase-firestore.js:1
index.ts:38 Uncaught Error: Cannot instantiate firebase-firestore.js -
be sure to load firebase-app.js first.
at index.ts:38
at firebase-firestore.js:1
at firebase-firestore.js:1
I am initializing firebase with these lines:
<script src="/__/firebase/8.2.1/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="/__/firebase/8.2.1/firebase-analytics.js"></script>
<!-- Initialize Firebase -->
<script src="/__/firebase/init.js"></script>
<script src="/__/firebase/7.14.5/firebase-firestore.js"></script>
What is the reason of it and how can I solve it?
Thanks for any kind of help in advance.
First, you just need to use the same version across all libraries. Mixing v7.14.5 with v8.2.1 is going to cause problems.
Second, this is a known firebase-tools issue and they are saying that updating to 8.2.3 resolves it. So my recommendation is to do the following:
Open a cmd or console window and update firebase-tools to the latest version:
firebase i -g firebase-tools
Update the version number of all of your scripts to 8.2.3.

Google autocomplete google.maps.__gjsload__ is not a function

i'm using google's autocomplete to fill address information on vtiger crm contacts module, using almost he exact same code (changing the ids of html elements) works fine in accounts but in contacts (were it worked for few days), without any changes it doesn't wroks... I have some js error in console
Uncaught TypeError: google.maps.\__gjsload__ is not a function(anonymous function) ... places_impl.js
Uncaught TypeError: google.maps.\__gjsload__ is not a function(anonymous function) ... controls.js
Uncaught TypeError: google.maps.\__gjsload__ is not a function(anonymous function) ... utils.js
Uncaught TypeError: google.maps.\__gjsload__ is not a function(anonymous function) ... commons.js
Has someone faced this problem?
It was my mistake, I was including google's api in other html to use a map... sry

Chrome browser errors on refresh of grunt serve in angular web app

I'm working on a single page angularjs app and im using grunt and bower as a dev server and dependency injection respectively. My application runs fine when it is first loaded from the "grunt serve" command, but when I refresh the page I get a string of uncaught type and reference errors and the application fails to load:
Uncaught RangeError: Maximum call stack size exceeded
jquery-ui.js:14 Uncaught ReferenceError: jQuery is not defined$.ui # jquery-ui.js:14(anonymous function) # jquery-ui.js:16
(index):1 Uncaught RangeError: Maximum call stack size exceeded
bootstrap.js:8 Uncaught Error: Bootstrap's JavaScript requires jQuery(anonymous function) # bootstrap.js:8
angular-animate.js:9 Uncaught TypeError: Cannot read property 'noop' of undefined(anonymous function) # angular-animate.js:9(anonymous function) # angular-animate.js:3721
angular-cookies.js:24 Uncaught TypeError: Cannot read property 'module' of undefined(anonymous function) # angular-cookies.js:24(anonymous function) # angular-cookies.js:321
angular-resource.js:8 Uncaught TypeError: Cannot read property '$$minErr' of undefined(anonymous function) # angular-resource.js:8(anonymous function) # angular-resource.js:669
angular-route.js:24 Uncaught TypeError: Cannot read property 'module' of undefined(anonymous function) # angular-route.js:24(anonymous function) # angular-route.js:992
angular-touch.js:28 Uncaught TypeError: Cannot read property 'module' of undefined(anonymous function) # angular-touch.js:28(anonymous function) # angular-touch.js:628
angular-chart.js:11 Uncaught ReferenceError: angular is not definedChart.defaults.global.responsive # angular-chart.js:11(anonymous function) # angular-chart.js:13
angular-aria.js:57 Uncaught TypeError: Cannot read property 'module' of undefined(anonymous function) # angular-aria.js:57(anonymous function) # angular-aria.js:393
angular-material.js:13 Uncaught TypeError: Cannot read property 'module' of undefined(anonymous function) # angular-material.js:13(anonymous function) # angular-material.js:14(anonymous function) # angular-material.js:17168
angular-sanitize.js:19 Uncaught TypeError: Cannot read property '$$minErr' of undefined(anonymous function) # angular-sanitize.js:19(anonymous function) # angular-sanitize.js:683
(index):1 Uncaught RangeError: Maximum call stack size exceeded
jquery.maskedinput.js:259 Uncaught ReferenceError: jQuery is not defined(anonymous function) # jquery.maskedinput.js:259
app.js:11 Uncaught ReferenceError: angular is not defined(anonymous function) # app.js:11
admin.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # admin.js:10
deployment.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # deployment.js:10
home.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # home.js:10
metrics.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # metrics.js:10
monitoring.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # monitoring.js:10
reporting.js:10 Uncaught ReferenceError: angular is not defined(anonymous function) # reporting.js:10
support.js:13 Uncaught ReferenceError: angular is not defined(anonymous function) # support.js:13
support.service.js:2 Uncaught ReferenceError: angular is not defined(anonymous function) # support.service.js:2
metrics.service.js:2 Uncaught ReferenceError: angular is not defined(anonymous function) # metrics.service.js:2
monitoring.service.js:2 Uncaught ReferenceError: angular is not defined(anonymous function) # monitoring.service.js:2
(index):1 Uncaught RangeError: Maximum call stack size exceeded
Has anyone experienced this before or know a solution? I dont think its a problem with the code.
For the "Maximum call stack size exceeded" you might want to check this: http://gruntjs.com/frequently-asked-questions#why-am-i-getting-a-maximum-call-stack-size-exceeded-error

Discover Meteor, Chapter 3-5: plain grey screen and no data

This is a follow-up question on Meteor: "=> Exited with code: 8" error.
Since Chapter 3 of Discover Meteor, whenever I run the server and visit the http://localhost:3000/ URL (or any other page of the app), I only get a plain, grey screen, with nothing on it:
I decided to go on with the tutorial, hoping that the next chapters would result in fixing what was wrong by updating some files, but it did not.
There is no error in the server log, so I cannot reproduce them here.
However, you can find all the files of the project on GitHub: https://github.com/thibaudclement/microscope
UPDATE: here are the client-side console logs:
Uncaught TypeError: Template.__create__ is not a function
meteor.js:225 Uncaught TypeError: Cannot read property 'prototype' of undefined
iron-router.js:1475 Uncaught TypeError: undefined is not a function
global-imports.js:3 Uncaught TypeError: Cannot read property 'RouteController' of undefined
template.layout.js:2 Uncaught ReferenceError: Template is not defined
template.loading.js:2 Uncaught ReferenceError: Template is not defined
template.post_item.js:2 Uncaught ReferenceError: Template is not defined
template.post_page.js:2 Uncaught ReferenceError: Template is not defined
template.posts_list.js:2 Uncaught ReferenceError: Template is not defined
template.main.js:2 Uncaught ReferenceError: Template is not defined
router.js:1 Uncaught ReferenceError: Router is not defined
post_item.js:1 Uncaught ReferenceError: Template is not defined
posts_list.js:1 Uncaught ReferenceError: Template is not defined
posts.js:1 Uncaught ReferenceError: Meteor is not defined
meteor.js:888 Exception in defer callback: TypeError: Cannot read property 'insert' of undefined
at Utils.extend.autoRender (http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1636:17)
at http://localhost:3000/packages/iron-router.js?af9f4791b8af4582a37d93bcade1eed163a976a8:1465:16
at _.extend.withValue (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:955:17)
at http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:435:45
at Object.<anonymous> (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:983:22)
at onGlobalMessage (http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:372:23)
Any idea of what I am doing wrong?
Or at least, where I should start looking to find what is going wrong?
Problem may be you're following old version of the book or with microscope(not sure)
I cloned your app and tried to run
in your .meteor/packages file
change
iron-router
spin
to
iron:router
sacha:spin
it is working fine for me afer these changes

Categories