cloudinary / cloudinary-vue

Cloudinary components library for Vue.js application, for image and video optimization.
https://cloudinary.com/documentation/vue_integration
98 stars 10 forks source link

Build fail after updating to v1.2.0 #133

Closed pktharindu closed 3 years ago

pktharindu commented 3 years ago

Bug report for Cloudinary Vue SDK

I've been using cloudinary-vue v1.1.2 in a nuxt.js project which has been working fine. But after I update to v1.2.0 build fail with the following error.

Issue Type (Can be multiple)

[x] Build - Can’t install or import the SDK [ ] Babel - Babel errors or cross-browser issues [ ] UI/Performance - Display or performance issues [ ] Behaviour - Functions aren’t working as expected (Such as generate URL) [ ] Documentation - Inconsistency between the docs and behavior [ ] Incorrect Types - For typescript users who are having problems with our d.ts files [ ] Other (Specify)

Error screenshots

image

patrick-tolosa commented 3 years ago

Thanks for reporting this issue, We'll update once we have more information to share.

powellian commented 3 years ago

I received the same build error in Nuxt after the same Cloudinary update. Got the site to build by commenting-out all references to Cloudinary in nuxt-config.js which seems to have isolated it to 'only' a Cloudinary issue.

Fingers crossed for a fix as using this in Netlify works well.

drevantonder commented 3 years ago

I use cloudinary-vue with the Cloudinary integration for Nuxt (@nuxtjs/cloudinary) for multiple projects.

I get the same errors as @pktharindu if I try to upgrade:

ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/array/from' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 186:17-69
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/get-iterator' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 214:17-71
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/is-iterable' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 151:17-70
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/freeze' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 228:17-72
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/get-own-property-descriptor' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 200:17-93
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/get-own-property-descriptors' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 116:17-94
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/get-own-property-symbols' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 130:17-90
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/keys' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 193:17-70
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/symbol' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 235:17-65
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/symbol/iterator' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 242:17-74
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js
ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@soda/get-current-script' in 'node_modules/cloudinary-vue/dist'
  @ ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js 172:17-52
@ ./plugins/cloudinary.js
@ ./node_modules/.cache/nuxt/index.js
@ ./node_modules/.cache/nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./node_modules/.cache/nuxt/client.js

For now I'm just sticking with v1.1.2. However, I do want the DPR changes in #122.

powellian commented 3 years ago

I tried a belt/braces approach:

Unfortunately localhost build still rendering same type of errors as screenshot above from @pktharindu eg:

ERROR in ./node_modules/cloudinary-vue/dist/Cloudinary.umd.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/array/from'
... etc

Tried the suggested workaround shown in the error - To install them etc... - but that fails at the first item.

For the record: package.json now reads this non-specific/wildcard version: "@nuxtjs/cloudinary": "*", package-lock.json now has this:

"@nuxtjs/cloudinary": {
  "version": "1.0.3-beta-4",
  "resolved": "https://registry.npmjs.org/@nuxtjs/cloudinary/-/cloudinary-1.0.3-beta-4.tgz",
  "integrity": "sha512-iMaJCvMKC3GW4F0Pw4Cn7lTRhw4CUm6bOoLx1ouEc66+rRQPQhTKxyeCNsMQ87tef1h8yH3U9jKSH7Sk5VtZSA==",
  "requires": {
    "@cld-apis/utils": "^0.1.1",
    "chalk": "^4.1.0",
    "cloudinary": "^1.23.0",
    "cloudinary-core": "^2.11.3",
    "cloudinary-vue": "^1.1.2",
    "consola": "^2.15.0",
    "defu": "^2.0.4"
  },
... ...
patrick-tolosa commented 3 years ago

We're planning on addressing this issue in our next sprint (starting May 18th). If you can provide a repro that would be much appreciated.

We'll update this thread once the fix is deployed.

inlikealion commented 3 years ago

Is there any advice on what to do in the meantime? I've been tasked with updating our apps dependencies and this one is throwing the above errors and stalled our upgrade cycle.

Edit: I'm rolling back to ~1.1.2 to see if that gets our app back to rendering until this is fixed.

patrick-tolosa commented 3 years ago

Unfortunately no workaround at this time, if you're still having issues with 1.1.2 please let us know in this thread.

if you could provide a repo that reproduces this, it would greatly speed up the efforts to fix it.

patrick-tolosa commented 3 years ago

Hey all, We just released version 1.2.1 which should resolve the issue. We've inlined all the imports that were sprinkled in the package.

Please report if you have any issues.