Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help or bug Nuxt #6

Open
Ben621 opened this issue May 6, 2020 · 5 comments
Open

help or bug Nuxt #6

Ben621 opened this issue May 6, 2020 · 5 comments

Comments

@Ben621
Copy link

Ben621 commented May 6, 2020

Hi

i have read you post on nuxt dev.to
so i have 2 thinks:

1 - when i put mode: "universal" i got an error:

cannot use import statement outside a module vue

but when i change it to spa it's work , i see also that appear in your post , but maybe you have omit to mention this change.

2 . when i tried to implement with vuetify that don't work:

<template>
  <v-app class="app">
    <particles-bg type="circle" :bg="true" /> 
    <nuxt/>
  </v-app>
</template>

here my print screen
Screenshot from 2020-05-06 14-35-49

but with div instead of v-app work


step to reproduce

yarn create nuxt-app NuxtParticles
cd NuxtParticles
yarn add particles-bg-vue

add file plugins/particles.ts
with this content

import Vue from "vue";
import VueParticlesBg from "particles-bg-vue";

Vue.use(VueParticlesBg);

edit the file nuxt.config.js

mode: 'spa'
plugins: ["@/plugins/particles"],

edit file layouts/default.vue as:

<template>
  <v-app class="app">
    <particles-bg type="circle" :bg="true" /> 
    <nuxt/>
  </v-app>
</template>

can you advise

Thank you

@Ntuk
Copy link

Ntuk commented Jun 27, 2020

Did you find a solution for this? I'm also having the same problem.

@Ben621
Copy link
Author

Ben621 commented Jun 28, 2020

no :-(

@lindelof
Copy link
Owner

Whether some settings are not right, maybe you can read this article
https://blog.tubone-project24.xyz/2019/12/02/particles-bg-vue

@yaoxian666
Copy link

引入相关组件后,页面还是无变化

@MAV3Ndev
Copy link

MAV3Ndev commented Mar 6, 2023

wrapping it around no-ssr tag may fix the problem :)

edit:
you should also change plugins: ["@/plugins/particles"], to plugins: ["@/plugins/particles" , mode: 'client'],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants