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

Unable to build the site #37

Open
EvanSchleret opened this issue Oct 23, 2022 · 4 comments
Open

Unable to build the site #37

EvanSchleret opened this issue Oct 23, 2022 · 4 comments

Comments

@EvanSchleret
Copy link

Hi,

I tried to build my Nuxt 3 application and got this error.

An idea ?

image

Best regards

@chrishessler
Copy link

I'm getting exactly the same error. Were you able to fix it @EvanSchleret ?

@wasitum
Copy link

wasitum commented Aug 14, 2024

Has anyone been able to fix this error ?

@jimmyachour
Copy link

same !

@wasitum
Copy link

wasitum commented Oct 21, 2024

Okay I managed to get it to work. Here is how :

  1. Create a plugin that is client only, by creating a toaster.client.js file in the plugins folder

  2. Here's the content of the plugin :

import {createToaster} from "@meforma/vue-toaster";

export default defineNuxtPlugin(() => {
  const toaster = createToaster({});

  return {
    provide: {toaster},
  };
});
  1. The provide section of the plugin gives us access to $toaster :
const {$toaster} = useNuxtApp();

$toaster.success('Victory music intensifies');

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

4 participants