Today, I encountered an issue with my Nuxt project that was previously running smoothly.
The problem seems to be related to Vue Flickity, which includes a CSS file from the node_modules
directory. This setup has been functioning correctly until now.
Upon running npm run dev
, I received the following error message:
ERROR in ./node_modules/flickity/dist/flickity.css?vue&type=style&index=0&lang=css& friendly-errors 16:00:12
Syntax Error: ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js): friendly-errors 16:00:12 SyntaxError
(141:7) Unknown word
139 | 140 | if(module.hot) {
141 | // 1548777611244 | ^ 142 | var cssReload = require("../../extract-css-chunks-webpack-plugin/dist/hotModuleReplacement.js")(module.id, {"fileMap":"{fileName}","reloadAll":true}); 143 |
module.hot.dispose(cssReload); > friendly-errors 16:00:12 @ ./node_modules/flickity/dist/flickity.css?vue&type=style&index=0&lang=css& 1:0-576 1:592-595 1:597-1170 1:597-1170 @ ./node_modules/vue-flickity/src/flickity.vue @ ./plugins/vue-flickity.js @ ./.nuxt/index.js @ ./.nuxt/client.js @ multi eventsource-polyfill webpack-hot-middleware/client?reload=true&timeout=30000&ansiColors=&overlayStyles=&name=client&path=/__webpack_hmr/client ./.nuxt/client.js
Screenshot:
https://i.sstatic.net/0hQaQ.png
I haven't made any changes to Webpack configuration as I used the cli to create this project.
Vue Flickity is being utilized through a plugin, recommended for Nuxt, with SSR set to false. Despite this, it was functioning perfectly fine until now.
I'm puzzled by this sudden issue and would greatly appreciate any assistance or guidance on resolving it.