question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The first argument is required and must be an <img> or <canvas> element.

See original GitHub issue

I’m getting “The first argument is required and must be an <img> or <canvas> element.”

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

12reactions
onukselcukcommented, Mar 11, 2021

I found the problem. I’m using the wrong version. Since nuxt.js is still based on vue2 I should be using 4.2.0 version of this package.

0reactions
Edmilson-Ccommented, May 16, 2022

I found the problem. I’m using the wrong version. Since nuxt.js is still based on vue2 I should be using 4.2.0 version of this package.

This worked for me. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cropper.js - The first argument is required and must be an ...
This is what I get: Error: The first argument is required and must be an <img> or <canvas> element. at new Cropper (cropper.js:3217)...
Read more >
The first argument is required and must be an <img ... - GitHub
I found that in code you do regex match to check if element is img or canvas, but still it doesn't explain why...
Read more >
Crop Images Online using the Cropper.js Library
cropper('getCroppedCanvas') returns the cropped canvas. Form there, we can call the canvas element's toDataURL() function to get its base 64 ...
Read more >
Cropping images in the browser with Vue.js - LogRocket Blog
The first step toward success with this example is to create a new project and get the necessary dependencies installed.
Read more >
4.8.10 The canvas element — HTML5 - W3C
A canvas element can have a primary context , which is the first context to have been obtained for that element. When created,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found