Trying to build a Nuxt SSR app, but encountering an error related to the css-loader during the build command execution. The issue seems to be with Invalid options object.
ERROR in ./node_modules/vue2-google-maps/dist/components/streetViewPanorama.vue (./node_modules/@nuxt/webpack/node_modules/css-loader/dist/cjs.js?minimize!./node_modules/vue-loader/lib/style-compiler?{"optionsId":"0","vue":true,"scoped":false,"sourceMap":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/vue2-google-maps/dist/components/streetViewPanorama.vue)
Module build failed (from ./node_modules/@nuxt/webpack/node_modules/css-loader/dist/cjs.js):
ValidationError: Invalid options object. CSS Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property 'minimize'. These properties are valid:
object { url?, import?, modules?, icss?, sourceMap?, importLoaders?, esModule? }
at validate (D:\Dev\Vuejs\Nuxt\nuxt-app\node_modules\@nuxt\webpack\node_modules\css-loader\node_modules\schema-utils\dist\validate.js:98:11)
at Object.loader (D:\Dev\Vuejs\Nuxt\nuxt-app\node_modules\@nuxt\webpack\node_modules\css-loader\dist\index.js:36:28)
@ ./node_modules/vue2-google-maps/dist/components/streetViewPanorama.vue (./node_modules/vue-style-loader!./node_modules/@nuxt/webpack/node_modules/css-loader/dist/cjs.js?minimize!./node_modules/vue-loader/lib/style-compiler?{"optionsId":"0","vue":true,"scoped":false,"sourceMap":false}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/vue2-google-maps/dist/components/streetViewPanorama.vue) 4:14-295
@ ./node_modules/vue2-google-maps/dist/components/streetViewPanorama.vue
@ ./node_modules/vue2-google-maps/dist/main.js
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./components/GoogleMap.vue
@ ./components/GoogleMap.vue
@ ./components/AddPost.vue
@ ./components/Header.vue
@ ./layouts/nossr.vue
@ ./.nuxt/App.js
@ ./.nuxt/index.js
@ ./.nuxt/client.js
@ multi ./node_modules/@nuxt/components/lib/installComponents.js ./.nuxt/client.js
I have installed the css-loader but the error still persists. Below is my package.json file:
{
"name": "test",
"version": "1.0.0",
"private": true,
... (content omitted for brevity) ...
}
Despite extensive searching, I haven't been able to find a solution to this problem. Any assistance would be greatly appreciated. Thanks in advance!