Skip to content

Is it supported by Nuxt js? #199

@TangoCh4rlie

Description

@TangoCh4rlie

The problem

Does someone know if wired-elements can be used with Nuxt.js?

I just tried to impelment this in my app.vue (root of my project).

It looks like this :

<script>
import { WiredButton } from 'wired-elements/lib/wired-button.js';
import { WiredInput } from 'wired-elements/lib/wired-input.js';
</script>

<template>
  <div>
    <wired-input placeholder="Enter name"></wired-input>
    <wired-button>Click Me</wired-button>
  </div>
</template>

Error

[nuxt] [request error] [unhandled] [500] SVGSVGElement is not defined

This is the stacktrace

at ./node_modules/.pnpm/wired-elements@3.0.0-rc.6/node_modules/wired-elements/lib/wired-base.js:75:31
at async ViteNodeRunner.runModule (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:399:5)
at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:381:5)
at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:206:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:259:12)
at async ./node_modules/.pnpm/wired-elements@3.0.0-rc.6/node_modules/wired-elements/lib/wired-button.js:1:31
at async ViteNodeRunner.runModule (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:399:5)
at async ViteNodeRunner.directRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:381:5)
at async ViteNodeRunner.cachedRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:206:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/.pnpm/vite-node@2.0.5_@types+node@22.5.4_terser@5.32.0/node_modules/vite-node/dist/client.mjs:259:12)

Issue?

Does someone have an idea to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions