I’ve tried adding stylus config of Vuetify to modify the global variables, until I noticed that it’s not supported anymore.
I’ve run this command to install the required loaders: npm i --save-dev stylus stylus-loader css-loader style-loader
.
After that, I started getting the error in the title, and after removing those libraries, it didn’t remove it at all. I’ve tried running npm reinstall
and have a complete fresh install of the npm packages.
My config is like this:
"devDependencies": { "axios": "^0.21.4", "bootstrap": "^4.6.0", "css-loader": "^6.2.0", "jquery": "^3.6", "laravel-mix": "^6.0.31", "lodash": "^4.17.19", "popper.js": "^1.16.1", "postcss": "^8.3.6", "resolve-url-loader": "^3.1.2", "sass": "^1.32.11", "sass-loader": "^11.0.1", "style-loader": "^3.2.1", "stylus": "^0.55.0", "stylus-loader": "^6.1.0", "vue": "^2.6.12", "vue-loader": "^15.9.8", "vue-template-compiler": "^2.6.12" }, "dependencies": { "vue-router": "^3.5.2", "vuetify": "^2.5.8", "vuex": "^3.6.2" }
Error log:
Uncaught TypeError: options.domAPI is not a function at addStyle (app.js:38836) at modulesToDom (app.js:38824) at module.exports (app.js:38854) at Module../node_modules/vuetify/dist/vuetify.min.css (app.js:38769) at __webpack_require__ (app.js:100988) at Module../resources/js/theme/Vuetify.js (app.js:2356) at __webpack_require__ (app.js:100988) at Module../resources/js/app.js (app.js:2139) at __webpack_require__ (app.js:100988)
This is an extremely annoying issue, as I’ve not found anything related to it. Any help is greatly appreciated.
Advertisement
Answer
I had to remove style-loader
and only use css-loader
to get this error go.
yarn remove style-loader