Calling Developers!
We are reenergizing our code contribution process! Learn More

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

Options
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
    Options

    spryker/gui 3.40.0

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

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

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

    Already having the latest 2.11.3.

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

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

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

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

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    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
    Options

    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
    Options

    Yes.

  • U01LKKBK97T
    U01LKKBK97T Posts: 287 🧑🏻‍🚀 - Cadet
    Options

    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...