Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

NPM issue (no such file or directory, open '**********/node_modules/datatables.net-buttons/js/buttons.flash.js)


Hello, I am trying to install the Laravel version of the Metronic theme. After applying the npm install and npm run dev commands, I am receiving the following errors. To ensure that the problem is not due to the Plesk panel, I also tested it on localhost and received the same error. Below are my system details. Could you please assist me in identifying the cause of the problem?

Here are the versions I am currently using on my server.
Node version: 21.7.3 (I also tested with 20.12.2, but the result did not change)
npm version: 10.5.0

Additionally, is there any harm in updating the versions of NPM packages to the latest version? Which packages should I not update to the latest version, and where can I find this information? Are there any special considerations I should be aware of when performing the update?

Thank you very much in advance.
-----------------------------------------------------------------------------------------------------
# npm install

up to date, audited 1434 packages in 4s

181 packages are looking for funding
run `npm fund` for details

44 vulnerabilities (40 moderate, 4 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues possible (including breaking changes), run:
npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

# npm run dev
Process exited with non-zero exit code '2'

> dev
> npm run development


> development
> mix

ℹ Compiling Mix

[webpack-cli] [Error: ENOENT: no such file or directory, open '/var/www/vhosts/******/******/node_modules/datatables.net-buttons/js/buttons.flash.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/www/vhosts/*******/*******/node_modules/datatables.net-buttons/js/buttons.flash.js'
}
-----------------------------------------------------------------------------------------------------


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (4)


Hi Sıtkı Eraslan,

You can follow these steps:

Locate the file /resources/mix/vendors/datatables/datatables.bundle.js in your Laravel project.

Open the file and look for the line that references datatables.net-buttons/js/buttons.flash.js.

Temporarily comment out or remove this line from the file.

Save the changes and try running the build process again.

This should allow the build process to complete successfully. We will include the fix in the next updates.

Thank you



I have commented out 'datatables.net-buttons/js/buttons.flash.js'. However, now I am encountering the following error.

# npm run dev
Process exited with non-zero exit code '2'

> dev
> npm run development


> development
> mix

ℹ Compiling Mix

[webpack-cli] [Error: ENOENT: no such file or directory, open '/var/www/vhosts/********/**********/node_modules/@yaireo/tagify/dist/tagify.min.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/var/www/vhosts/************/*********/node_modules/@yaireo/tagify/dist/tagify.min.js'
}



In the file /laravel/starterkit/resources/mix/plugins.js, you need to change the reference from tagify.min.js to tagify.js. This change is necessary because recent versions of Tagify have removed the tagify.min.js file.

Replace reference to tagify.min.js with tagify.js. This should resolve the issue with the Tagify library.



If you remove buttons/js/buttons.flash.js, won't you break the table and its functions?


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(