Topic: Upgrading jq-pro 4.7.7 to 4.8 broke my webpack
david1 pro asked 3 years ago
I simply ran a yarn upgrade.
Now when I try to compile I get
ERROR Failed to compile with 1 errors 9:36:29 AM
This dependency was not found:
- mdbootstrap-pro in ./assets/js/app.js
Nothing else changed. Previous upgrades ran smoothly.
Meanwhile I reverted to 4.8.10, thanks David for advise.
This is still an issue in 4.8.8
I'm not sure exactly why the package.json references a non-existent file, but when I change the "main" entry in package.json from "index.js" to "js/mdb.js" everything works perfectly.
Am I missing something?
This is still an issue (I think) in 4.8.7
I'm not sure exactly why the package.json references a non-existant file, but when I change the "main" entry in package.json from "index.js" to "js/mdb.js" everything works perfectly.
Thanks TomekMakowski for the heads up.
I re-visited this and took a deeper look at the issue.
I ran yarn encore dev --verbose and examined the error more closely.
What I found is that in 4.7.7 the package.json file had a "main" value of "js/mdb.js".
In 4.8.x that was changed to "index.js".
Granted, webpack is still magic to me, but there is no file named index.js anywhere in the node_modules/mdbootstrap-pro directory or subdirectories.
However, when I change the "main" entry in package.json to "js/mdb.js" (which actually exists), everything works perfectly.
I'm not sure of the standard webpack practice here. I'm not sure if your package.json file is wrong or my configuration is wrong.
I'm using Symfony Encore to handle webpack. It worked without any modification in 4.7.7 and broke with 4.8.
I'm researching how to define an alias for index.js, but again, it's all magic to me at this point.
I got acquainted with webpack tutorial and everything works properly
Having the same problem here. Thanks for the temporary fix David.
FYI for anyone else effected:
Simply append the 4.7.7 commit to your package.json dependency entry:
This will go back to 4.7.7 until 4.8 issue is resolved.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.7.7
- Device: Macbook Pro
- Browser: NA
- OS: Mac
- Provided sample code: No
- Provided link: No