Read the statement by Michael Teeuw here.
Having issues loading library
-
I’m trying to load annyang but during the loading of my module there is a failure, 404 not found.
My module code is this:
Module.register("jarvis", { // Required Scripts getScripts: function() { return ["annyang.js"]; } });Any help would be appreciated, I added the library to package.json and installed it but it won’t load. I tried testing with moment.js and it worked, is there anywhere else I need to reference the library other than
package.json?
Note from admin: Please use Markdown on code snippets for easier reading!
-
@gndimitro Found the issue, I needed to copy the script to the vendor folder and modify the vendor.js script
-
@gndimitro when you install a dependency with npm it’s not in your module folder, instead it will be in
jarvis/node_modules/annyang/annyang.jsgetScripts: function() { return [this.file("node_modules/annyang/annyang.js")]; } -
@gndimitro FYI: to install a 3rd-party module, you should never need to modify any of the core files, like vendor.js.
-
@MichMich Thanks! I’ll fix my code accordingly so that I won’t modify vendor.js
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login