advanced-cropper / vue-advanced-cropper

The advanced vue cropper library that gives you opportunity to create your own croppers suited for any website design
https://advanced-cropper.github.io/vue-advanced-cropper/
Other
930 stars 128 forks source link

Can't add vue2 version using yarn #235

Closed MoKhawatmi closed 1 year ago

MoKhawatmi commented 1 year ago

trying to add the v2 version using 'yarn add vue-advanced-cropper@vue-2' results in this error: Error: vue-advanced-cropper@vue-2 isn't supported by any available resolver.

i can use 'yarn add vue-advanced-cropper' and it will be added fine but it just doesn't work in my vue2 project and has all kinds of errors

Norserium commented 1 year ago

Well, it works.

$ yarn add vue-advanced-cropper@vue-2
yarn add v1.22.19
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > vue-advanced-cropper@1.11.6" has unmet peer dependency "vue@^2.6.6".
[4/4] Building fresh packages...

success Saved lockfile.
success Saved 4 new dependencies.
info Direct dependencies
└─ vue-advanced-cropper@1.11.6
info All dependencies
├─ classnames@2.3.2
├─ debounce@1.2.1
├─ easy-bem@1.1.1
└─ vue-advanced-cropper@1.11.6
Done in 3.30s.
MoKhawatmi commented 1 year ago

I don't understand..why am i getting this then? i tried adding from git bash and from windows cmd, same issue..any idea why? ➤ YN0000: ┌ Resolution step ➤ YN0001: │ Error: vue-advanced-cropper@vue-2 isn't supported by any available resolver at zf.getResolverByDescriptor (C:\Users\user\AppData\Local\node\corepack\yarn\3.3.1\yarn.js:391:1647) at zf.bindDescriptor (C:\Users\user\AppData\Local\node\corepack\yarn\3.3.1\yarn.js:391:1036) at Z (C:\Users\user\AppData\Local\node\corepack\yarn\3.3.1\yarn.js:439:6905) ➤ YN0000: └ Completed ➤ YN0000: Failed with errors in 0s 39ms

Norserium commented 1 year ago

@MoKhawatmi, what's the version of yarn do you use? Did you try to use npm?

MoKhawatmi commented 1 year ago

i tried to use npm and didn't get this error, but i can't just go with it because the project uses yarn install to download packages in the deployment pipeline. as for the version, running yarn --version returns 3.3.1

Norserium commented 1 year ago

@MoKhawatmi, how did you install that version? I don't see it here.

Norserium commented 1 year ago

@MoKhawatmi, also you always can try to use:

yarn add vue-advanced-cropper@1.11.6
MoKhawatmi commented 1 year ago

now you mention it, i don't remember installing yarn on my machine at all. i just cloned the project's repo and used yarn install and added new packages too and everything was working. trying yarn add vue-advanced-cropper@1.11.6 worked perfectly fine! i added the package and now the cropper code works great! thank you for your help!

Norserium commented 1 year ago

@MoKhawatmi, you are welcome. Also you can adjust the version in package.json and replace "1.11.6" by "^1.11.6".