Wuzi
Wuzi

Reputation: 406

Uncaught TypeError: b is not a function in nodejs(electron)

I installed the gentelella template from npm package manager and i'm trying to include the PNotify script like this(css is included at the top):

<!-- jQuery -->
<script src="node_modules/gentelella/vendors/jquery/dist/jquery.min.js"></script>

<!-- PNotify -->
<script src="node_modules/gentelella/vendors/pnotify/dist/pnotify.js"></script>

However when i execute the application i get this error:

pnotify.js:6 Uncaught TypeError: b is not a function
at q (pnotify.js:6)
at pnotify.js:31
at pnotify.js:6
at pnotify.js:6

But when i execute the index.html using the browser it works fine, why?

Thanks!

Upvotes: 1

Views: 3748

Answers (1)

Wuzi
Wuzi

Reputation: 406

It seems the jquery wasn't loading correctly.

I did this and it worked:

Electron: jQuery is not defined

Upvotes: 1

Related Questions