Nuxt build error
See original GitHub issueI am facing this error when building my project, it works fine on development, but when i build i get an error:
ERROR in ./node_modules/swiper/swiper-bundle.css (./node_modules/@nuxt/postcss8/node_modules/css-loader/dist/cjs.js??ref--3-oneOf-1-1!./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js??ref--3-oneOf-1-2!./node_modules/swiper/swiper-bundle.css)
Module build failed (from ./node_modules/@nuxt/postcss8/node_modules/postcss-loader/dist/cjs.js):
ParserError: Syntax Error at line: 1, column 36
at /home/user/Desktop/Project//node_modules/swiper/swiper-bundle.css:153:3
~/plugins/swiper.js
import Vue from 'vue'
import VueAwesomeSwiper from 'vue-awesome-swiper'
Vue.use(VueAwesomeSwiper)
nuxt.config.js
// Global CSS: https://go.nuxtjs.dev/config-css
css: [
'swiper/swiper-bundle.css',
],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [
'~/plugins/swiper.js',
],
the error comes when i build
npm run build or npm run generate
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9
Top Results From Across the Web
How Can I Solve this Nuxt npm run build error - Stack Overflow
I'm trying to deploy a nuxt app to namecheap following a tutorial I found here, when I run npm run build from the...
Read more >[Nuxt build error] builder:webpack · Issue #5566 - GitHub
Environment Operating System: Darwin Node Version: v16.14.2 Nuxt Version: 3.0.0-rc.3 Package Manager: yarn@1.22.4 Builder: webpack User ...
Read more >Commands and Deployment - Nuxt
To return a non-zero status code when a page error is encountered and let the CI/CD fail the deployment or build, you can...
Read more >Deploying a new nuxt 3 app result to error - Support
Hello,. I've created a new nuxt 3 app and tried to delopy it to netlify with github: stoic-fermat-995d10. The build stop when It...
Read more >NodeJS fails to compile for NuxtJS app - Build debugging - Fly.io
This is the full log for the failure, starting from fly de… ... nuxt build #8 1.825 ℹ Production build #8 1.826 ℹ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to add it to Nuxt with making a plugin like this :
installed the libs:
plugins/vue-awesomeSwiper.js
nuxt.config.js
Then it worked for me.
@virkse @rabichawila @Josh979 This issue is “calc() breaks when using 3+ variable fallbacks” https://github.com/postcss/postcss-calc/issues/104
You can rewrite swiper.css (related class): From
to