Search code examples
phplaravelnpmlaravel-8laravel-mix

ENOENT: no such file or directory! in Laravel


When I run npm run dev for Laravel Mix in webpack.mix.js, I get the following error: I don't know the problem. It just sticks to one of my files.

[webpack-cli] [Error: ENOENT: no such file or directory, open 'C:\Users\AsemaN\Desktop\AryaBMS\resources\css\MainPage\sweetaleret2.all.min.css'] { errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\Users\AsemaN\Desktop\AryaBMS\resources\css\MainPage\sweetaleret2.all.min.css' } npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] development: mix npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] development script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\AsemaN\AppData\Roaming\npm-cache_logs\2022-01-26T19_09_23_305Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! [email protected] dev: npm run development npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the [email protected] dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\AsemaN\AppData\Roaming\npm-cache_logs\2022-01-26T19_09_23_491Z-debug.log


Solution

  • The application expects to find a file at C:\Users\AsemaN\Desktop\AryaBMS\resources\css\MainPage\sweetaleret2.all.min.css. However, that file does not exist. EOENT means 'Error NO ENTity,' which translates to no directory or file was found in English. So you either need to create the expected directory/file or configure your application to look in the correct directory for sweetaleret2.all.min.css. Perhaps you misspelled the file name somewhere?