简体   繁体   中英

Meteor Lepozepo cloudinary $ is not defined

I am trying to use the lepozepo:cloudinary package, but I receive an error regarding this code.

$.cloudinary.config({
  cloud_name: "dx8pjibvk"
});

The error states: ReferenceError: $ is not defined

Jquery is installed. What can I do to fix this?

Where exactly do you write that code? If it's in a lib folder it might be executed too early. Try this:

Meteor.startup(function(){
  if(Meteor.isClient){
    $.cloudinary.config({
      cloud_name: "dx8pjibvk"
    });
  }
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM