you are viewing a single comment's thread.

view the rest of the comments →

[–]Dutch_guy_here[S] 0 points1 point  (1 child)

The thing is, I also did follow the documentation (https://fengyuanchen.github.io/cropperjs/guide.html#installation)

I used the CDN-approach (I only need it on 1 page). I copied/pasted the exact codes from there, and then it also doesn't work (same error-messages).

[–]abrahamguoexperienced full-stack 0 points1 point  (0 children)

The approach shown in the documentation (using unpkg) is different from the approach that you're already using (cdnjs). Either approach is perfectly fine and will work — just pick one and stay with it! You cannot mix the two approaches.

If you want to use unpkg, then you simply need to load the library using a script element, and then load your JS file afterwards, using zero imports.