yarn encore fail with datatable bootstrap 5

yarn encore fail with datatable bootstrap 5

TheCoonTheCoon Posts: 2Questions: 1Answers: 1

Hello,

I am using Symfony 6, dataTables.bootstrap5.min.js and yarn encore.
When i try to use the command :
yarn encore dev

There is the following error :

Module build failed: Module not found:
"./assets/js/datatable/dataTables.bootstrap5.min.js" contains a reference to the file "datatables.net".
This file can not be found, please check it for typos or update it if the file got moved.

I am using jQuery with the app.js in my assets folder with :
const $ = require('jquery');

What can i do to solve this error ?

It was working in Symfony 4 and dataTables.bootstrap4.min.js.

Thanks.

The Coon

This question has an accepted answers - jump to answer

Answers

  • TheCoonTheCoon Posts: 2Questions: 1Answers: 1
    Answer ✓

    I found the solution by installing dataTable bootrap 5 with npm.

    You can close this topice :smiley:

  • allanallan Posts: 63,262Questions: 1Answers: 10,423 Site admin

    Interesting. I'll keep a look out for similar issues. It should certainly work with Yarn, although I haven't tried it specifically in an Encore environment before.

    Allan

Sign In or Register to comment.