unjs / defu

🌊 Assign default properties recursively
MIT License
1.06k stars 22 forks source link

[Nuxt 2] defu__WEBPACK_IMPORTED_MODULE_3__ is not a function #81

Closed mrleblanc101 closed 1 year ago

mrleblanc101 commented 1 year ago

Environment

Node: v16.19.1

    "dependencies": {
        "@nuxtjs/apollo": "^4.0.1-rc.5",
        "@nuxtjs/auth-next": "^5.0.0-1667386184.dfbbb54",
        "@nuxtjs/axios": "^5.13.6",
        "@nuxtjs/gtm": "^2.4.0",
        "@nuxtjs/sentry": "^5.1.7",
        "@nuxtjs/svg": "^0.4.0",
        "@sentry/tracing": "^6.17.7",
        "body-scroll-lock": "^4.0.0-beta.0",
        "cookie-universal-nuxt": "^2.2.2",
        "elasticsearch": "^16.7.3",
        "elasticsearch-client-retry": "^0.1.0",
        "focus-trap": "^7.2.0",
        "foundation-sites": "^6.7.5",
        "graphql-tag": "^2.12.6",
        "jquery": "^3.6.1",
        "lodash": "^4.17.21",
        "maska": "^2.1.6",
        "md5": "^2.3.0",
        "moment-duration-format": "^2.3.2",
        "nuxt": "^2.15.8",
        "nuxt-jsonld": "v1",
        "nuxt-mq": "^2.0.2",
        "portal-vue": "2.1.7",
        "stopwords-fr": "^0.3.0",
        "uuid": "^9.0.0",
        "v-click-outside": "^3.2.0",
        "vue-adblock-detector": "^1.2.4",
        "vue-infinite-loading": "^2.4.5",
        "vue-priority-plus-navigation": "nguyenj/vue-priority-plus-navigation#master",
        "vue-scrollto": "^2.20.0",
        "vue-slick": "^1.2.0",
        "vue-sticky-directive": "^0.0.10",
        "vue-transition-expand": "^0.1.0",
        "what-input": "^5.2.10"
    },

Reproduction

Capture d’écran, le 2023-03-07 à 10 20 18 Capture d’écran, le 2023-03-07 à 10 20 08

yarn.lock.txt

Describe the bug

I just ran a yarn upgrade in our Nuxt 2 app the problem seem to come from rc9 which upgraded defu@6.1.2

Additional context

No response

Logs

No response

mrleblanc101 commented 1 year ago

Current workaround, add this in nuxt.config.js:

export default {
    build: {
        transpile: ['defu'],
    },
}
pi0 commented 1 year ago

Hi. This should be resolved in next release see https://github.com/unjs/defu/issues/110