What are the Slack Archives?

Itโ€™s a history of our time together in the Slack Community! Thereโ€™s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you wonโ€™t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

I'm getting this when calling the zed UI locally: ```Uncaught TypeError: $.fn.dataTable is undefined

U01LKKBK97T
U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

I'm getting this when calling the zed UI locally:

Uncaught TypeError: $.fn.dataTable is undefined
    setTableErrorMode data-table.js:41
    js init.js:57

Could anybody point me to the package missing, please?

Comments

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    spryker/gui 3.40.0

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    U have to udate spryker/oryx-for-zed npm library and then rebuild the zed frontend

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Already having the latest 2.11.3.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    did u run all again?
    frontend:project:install-dependencies
    fronten:zed:install-dependencies
    frontend:zed:build -e <environment)

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Yes, doesn't help.
    I'm having spryker/gui 3.40.0 btw.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    This is the complete browser console log. Anything suspicious, maybe a version mismatch?

    Uncaught TypeError: $.fn.dataTable is undefined
        setTableErrorMode data-table.js:41
        js init.js:57
        jQuery 13
        Webpack 9
    data-table.js:41:5
        setTableErrorMode data-table.js:41
        js init.js:57
        jQuery 13
        Webpack 9
    

    The error gets thrown due to this line in vendor/spryker/gui/src/Spryker/Zed/Gui/Presentation/Layout/layout.twig:

    <script src="{{ assetsPath('js/spryker-zed-gui-commons.js') }}"></script>
    
  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Seems that the JS error vanishes after updating spryker/gui from 3.40.0 to 3.40.1.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Lรถffelhardt Spryker Solution Partner Posts: 871 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Yes I know, a lot of people had the same problem, but with update oryx-for-zed and rebuild is gone..
    Stupid question: Browser cache empty??

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Yes.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 ๐Ÿง‘๐Ÿปโ€๐Ÿš€ - Cadet

    Funny enough, last time I was updating spryker/gui, I had to freeze it to 3.40.0 to get rid of JS errors. This time it's the exact opposite...