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:
JavaScript
x
25
25
1
"devDependencies": {
2
"axios": "^0.21.4",
3
"bootstrap": "^4.6.0",
4
"css-loader": "^6.2.0",
5
"jquery": "^3.6",
6
"laravel-mix": "^6.0.31",
7
"lodash": "^4.17.19",
8
"popper.js": "^1.16.1",
9
"postcss": "^8.3.6",
10
"resolve-url-loader": "^3.1.2",
11
"sass": "^1.32.11",
12
"sass-loader": "^11.0.1",
13
"style-loader": "^3.2.1",
14
"stylus": "^0.55.0",
15
"stylus-loader": "^6.1.0",
16
"vue": "^2.6.12",
17
"vue-loader": "^15.9.8",
18
"vue-template-compiler": "^2.6.12"
19
},
20
"dependencies": {
21
"vue-router": "^3.5.2",
22
"vuetify": "^2.5.8",
23
"vuex": "^3.6.2"
24
}
25
Error log:
JavaScript
1
11
11
1
Uncaught TypeError: options.domAPI is not a function
2
at addStyle (app.js:38836)
3
at modulesToDom (app.js:38824)
4
at module.exports (app.js:38854)
5
at Module../node_modules/vuetify/dist/vuetify.min.css (app.js:38769)
6
at __webpack_require__ (app.js:100988)
7
at Module../resources/js/theme/Vuetify.js (app.js:2356)
8
at __webpack_require__ (app.js:100988)
9
at Module../resources/js/app.js (app.js:2139)
10
at __webpack_require__ (app.js:100988)
11
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.
JavaScript
1
2
1
yarn remove style-loader
2