image: Receiving `Cannot read properties of undefined (reading 'get') on version 0.6.1`
Version 0.6.1 broke something when running nuxt generate and I’m not sure what it is.
Please see the error I get below:
FATAL Cannot read properties of undefined (reading 'get')
at _interopNamespace (node_modules/@nuxt/image/dist/module.js:26:39)
at node_modules/@nuxt/image/dist/module.js:290:83
at async ModuleContainer.imageModule2 (node_modules/@nuxt/image/dist/module.js:290:20)
at async ModuleContainer.addModule (node_modules/@nuxt/core/dist/core.js:239:20)
at async ModuleContainer.ready (node_modules/@nuxt/core/dist/core.js:55:5)
at async Nuxt._init (node_modules/@nuxt/core/dist/core.js:478:5)
╭────────────────────────────────────────────────────────────────────╮
│ │
│ ✖ Nuxt Fatal Error │
│ │
│ TypeError: Cannot read properties of undefined (reading 'get') │
│ │
╰────────────────────────────────────────────────────────────────────╯
Nuxt version: 2.15.8
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 18
- Comments: 22 (3 by maintainers)
Commits related to this issue
- fix: avoid dynamic import of `lru-cache` (resolves #481) — committed to procrates/nuxt-image by pi0 2 years ago
same happened with me after upgraded 0.6.0 to 0.6.1 using nuxt 2
I think it’s related to Rollup:
Temporary fix Adding optional chaining solves the issue in my case and lets the build succeed:
Object.defineProperty(n, k, d?.get ? d : {The
_interopNamespacefunction is part of Rollup’sesModuleInteropfunctionality: https://rollupjs.org/guide/en/#outputinterop~Even though I am pretty sure I did exactly this before, I deleted
yarn.lockand ranyarn install && yarn upgradeand now it is fixed for me 👍~Edit: Nope, sorry, did not solve it after all 😕
The issue should be solved in
0.6.2.Traceback seems related to the
lru-cacheimport but I cannot reproduce it with a fresh installation of 2.15/2.16 with/without bridge andnuxt generate.Can you please try to recreate lockfile (
package.lock.json/yarn.lock) if it solves issue or not?I am having the same problem (upgraded from 0.6.0 to 0.6.1) I am on nuxt 2
I am having the same problem (upgraded from 0.6.0 to 0.6.1)
I am having the same problem (upgraded from 0.6.0 to 0.6.1)
I am on nuxt bridge