How to solve the problem of error reported in nuxt.js by Unexpected token import?

problem description

an error is reported when using vue-qr to generate a QR code.

< template >
< div class= "bgfff" >

<vue-qr :size="200" text="hello world!"></vue-qr>

< / div >
< / template >
< script >
import ClipboardJS from "clipboard";
import VueQr from "vue-qr";
import {

Toast

} from "vant";
export default {

head() {
    return {
        title: ""
    };
},

components:{
    VueQr
},
data() {
    return {
        ddkUrl: require("~/assets/images/help/dkd-qrcode.png"),
        config:{
            value:"www.baidu.com"
            // imagePath:
        },
     
},

};
< / script >

Aug.19,2021

Hello, landlord! Since this is server-side rendering, when selecting components, you should first investigate whether the selected components support server-side rendering. Obviously, vue-qr does not support server-side rendering. You can try this https://github.com/davidshimj.

. < hr >

if it is helpful, please click to adopt it, thank you ~

Menu