Mix cannot find dependencies for app.js and app.scss
I am trying to follow along with the "Laravel Mix and the Front-end" episode. I had a few hiccups with some modules, but I think that I have resolved those. Now I am getting this dependency error even though the files are clearly in my project.
95% emitting ERROR Failed to compile with 2 errors12:27:19 PM
These dependencies were not found:
C:\Laravel Projects\recipeGatherer\resources\assets\js\app.js in multi ./resou rces/assets/js/app.js ./resources/assets/sass/app.scss
C:\Laravel Projects\recipeGatherer\resources\assets\sass\app.scss in multi ./r esources/assets/js/app.js ./resources/assets/sass/app.scss
To install them, you can run: npm install --save C:\Laravel Projects\recipeGathe rer\resources\assets\js\app.js C:\Laravel Projects\recipeGatherer\resources\asse ts\sass\app.scss A sset Size Chunks Chunk Names
/js/app.js 2.8 kB 0 [emitted] /js/app
mix-manifest.json 32 bytes [emitted]
Same here: After a lot of debugging, comparing node_modules from a project that is working... i found that some modules were not being installed... not all of them were really necessary, so i got it working by installing the following:
@alcirsimoes your fix worked. I just reinstalled these 3 modules and I no longer get the error. Probably a version mismatch somewhere within those packages or something.
Using @alcirimoes's suggestion, I resolved one of the dependency errors. I could never get the second one resolved. After searching around a while, I deleted my node_modules folder AND the package-lock.json file. After re-running npm install, the dependency errors were gone. I am guessing that something in the package-lock.json file was preventing npm from installing the modules I still needed.
@smitpatelx This entire thread is not relevant anymore. Those values will work for Laravel 5.8/6 apps, but not for the versions that were released 2 years ago.
Consider thinking about this before posting. Versioning changes fast, and plays a factor in whether an app works or not.