@christophaust It looks like you’re assigning the emojioneArea to the window object, but then trying to use it as a jQuery object.
Mar 16, 2021
9
Level 5
Adding a node module to my JS
Hello guys, I am having an issue with loading a npm module to my js.
So what I did was:
npm install emojionearea@^3.0.0
then I added this line to bootstrap.js:
window.emojioneArea = require('emojionearea');
From my understanding this should load the module and make it available in the js file which is linked in my blade template.
Trying to use the module ends up with:
Uncaught TypeError: $(...).emojioneArea is not a function
also I cannot seem to find a trace of the string "emoji" in my js file. So how do I pull this in correctly?
Please or to participate in this conversation.