1 year ago

#385742

test-img

lhommenul

Vitejs with Vuejs build dist production is missing => this.getView(...) is undefined ( devextreme module )

Vuejs/Vite/Devextreme

Hi everyone, 3 days ago i have decided to move my Vuejs project to Vitejs ( which is great) but now i'm trying to upload my production build to my production server => ERROR.

On the local dev server all modules installed on my project are working well, but when I am building the project and then launching the preview every module seems to be loaded but I got an error from one of them which is:

TypeError: this.getView(...) is undefined

I have read this : https://stackoverflow.com/a/43763691/18633965 And I'm thinking that i need to change the vite.config.js and choose an engine that doesn't change the reference of the function or something like that ...

Thanks

This is the console error
TypeError: this.getView(...) is undefined
    _initMarkup http://localhost:4173/assets/data-grid.769c2f69.js:1
    QA http://localhost:4173/assets/index.cb0fab01.js:15
    _renderComponent http://localhost:4173/assets/index.cb0fab01.js:15
    _updateDOMComponent http://localhost:4173/assets/index.cb0fab01.js:15
    endUpdate http://localhost:4173/assets/index.cb0fab01.js:15
    QA http://localhost:4173/assets/index.cb0fab01.js:15
    endUpdate http://localhost:4173/assets/index.cb0fab01.js:312
    QA http://localhost:4173/assets/index.cb0fab01.js:15
    endUpdate http://localhost:4173/assets/data-grid.769c2f69.js:1
    QA http://localhost:4173/assets/index.cb0fab01.js:15
    mounted http://localhost:4173/assets/index.cb0fab01.js:257
    ln http://localhost:4173/assets/index.cb0fab01.js:4
    Ot http://localhost:4173/assets/index.cb0fab01.js:4
    __weh http://localhost:4173/assets/index.cb0fab01.js:4
    ms http://localhost:4173/assets/index.cb0fab01.js:4
    gm http://localhost:4173/assets/index.cb0fab01.js:4
    promise callback*hm http://localhost:4173/assets/index.cb0fab01.js:4
    pm http://localhost:4173/assets/index.cb0fab01.js:4
    Wd http://localhost:4173/assets/index.cb0fab01.js:4
    ym http://localhost:4173/assets/index.cb0fab01.js:4
    T http://localhost:4173/assets/index.cb0fab01.js:4
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    effect http://localhost:4173/assets/index.cb0fab01.js:1
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    effect http://localhost:4173/assets/index.cb0fab01.js:1
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    set value http://localhost:4173/assets/index.cb0fab01.js:1
    I http://localhost:4173/assets/index.cb0fab01.js:8
    E http://localhost:4173/assets/index.cb0fab01.js:8
    promise callback*E http://localhost:4173/assets/index.cb0fab01.js:8
    P http://localhost:4173/assets/index.cb0fab01.js:8
    install http://localhost:4173/assets/index.cb0fab01.js:8
    use http://localhost:4173/assets/index.cb0fab01.js:4
    <anonymous> http://localhost:4173/assets/index.cb0fab01.js:323
index.cb0fab01.js:4:1162
    PC http://localhost:4173/assets/index.cb0fab01.js:4
    Zi http://localhost:4173/assets/index.cb0fab01.js:4
    ln http://localhost:4173/assets/index.cb0fab01.js:4
    Ot http://localhost:4173/assets/index.cb0fab01.js:4
    __weh http://localhost:4173/assets/index.cb0fab01.js:4
    ms http://localhost:4173/assets/index.cb0fab01.js:4
    gm http://localhost:4173/assets/index.cb0fab01.js:4
    (Async: promise callback)
    hm http://localhost:4173/assets/index.cb0fab01.js:4
    pm http://localhost:4173/assets/index.cb0fab01.js:4
    Wd http://localhost:4173/assets/index.cb0fab01.js:4
    ym http://localhost:4173/assets/index.cb0fab01.js:4
    T http://localhost:4173/assets/index.cb0fab01.js:4
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    effect http://localhost:4173/assets/index.cb0fab01.js:1
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    effect http://localhost:4173/assets/index.cb0fab01.js:1
    uc http://localhost:4173/assets/index.cb0fab01.js:1
    al http://localhost:4173/assets/index.cb0fab01.js:1
    set value http://localhost:4173/assets/index.cb0fab01.js:1
    I http://localhost:4173/assets/index.cb0fab01.js:8
    E http://localhost:4173/assets/index.cb0fab01.js:8
    (Async: promise callback)
    E http://localhost:4173/assets/index.cb0fab01.js:8
    P http://localhost:4173/assets/index.cb0fab01.js:8
    install http://localhost:4173/assets/index.cb0fab01.js:8
    use http://localhost:4173/assets/index.cb0fab01.js:4
    <anonymous> http://localhost:4173/assets/index.cb0fab01.js:323

Workaround while the realm is working on the issue

Add the following to the defineConfig in vite.config.js:

tiket is open en devextreme ( https://supportcenter.devexpress.com/ticket/details/t1054272/vue3-react-vite-rollup-devextreme-fails-in-production-because-some-modules-do-not-pass )

resolve: {
    alias: {
        "devextreme/ui": 'devextreme/esm/ui'
    }
},

javascript

vue.js

devextreme

vite

0 Answers

Your Answer

Accepted video resources