Hi. Today I encountered a problem when I try to deploy vue project. After that, I searched on Google. There wasn’t enough resource about Buefy UnhandledPromiseRejectionWarning Error. You can look my previous post about Python’s compile method.
Buefy UnhandledPromiseRejectionWarning Error Solution
There is only way to solve this problem. I’ve tried a lot of things to solve this problem. Actually I have no idea why this is happening. Why the order is important? I don’t know. Anyway, for example your main.js file look like this:
import Vue from 'vue' import App from './App' import router from './router' import Buefy from 'buefy' import 'buefy/lib/buefy.css' import '@mdi/font/css/materialdesignicons.min.css'
When you try to npm run build comman you’ll get UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token � in JSON at position XXX error. This error fired because of import order. In order to solve this problem you need to change buefy and mdi order. For example:
import Vue from 'vue' import App from './App' import router from './router' import Buefy from 'buefy' import '@mdi/font/css/materialdesignicons.min.css' import 'buefy/lib/buefy.css'
Yep. It will build now. This isn’t make sense for me but this is happening. If you got an error like that you can use this solution. I hope this will help you.