slidev-theme-penguin icon indicating copy to clipboard operation
slidev-theme-penguin copied to clipboard

Theme not working

Open jesielviana opened this issue 3 years ago • 8 comments

I installed the penguin theme, but it's not working. When I open the slides, the following message appears:

Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/node_modules/slidev-theme-penguin/components/corner-curves/assets/curve-big.svg') is not a valid name.

jesielviana avatar Jun 21 '21 22:06 jesielviana

Hey thanks for reporting @jesielviana . Did you install the last version?

I also had the issue but I changed the assets from the location in this PR https://github.com/alvarosaburido/slidev-theme-penguin/pull/6 and worked. Let me know if it's still the case and I will check it

alvarosabu avatar Jun 22 '21 07:06 alvarosabu

hi,I installed v1.1.2 with the same error:

runtime-dom.esm-bundler.js:21 Uncaught (in promise) DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('/node_modules/slidev-theme-penguin/components/corner-curves/assets/curve-big.svg') is not a valid name.

border1px avatar Aug 30 '21 01:08 border1px

I couldn't start due to the same phenomenon

unotovive avatar Oct 03 '21 15:10 unotovive

I'm gonna take care of this asap, thanks for reporting

alvarosabu avatar Oct 04 '21 06:10 alvarosabu

@jesielviana @unotovive @border-1px There is a workaround by installing this package vite-svg-loader and adding a vite.config.js on your project

import svgLoader from 'vite-svg-loader'

export default {
  plugins: [svgLoader()],
}

I will try to investigate if there is a way of having this by default when installing instead of adding it manually. Let me know if it works I just tested it.

alvarosabu avatar Oct 04 '21 08:10 alvarosabu

@alvarosaburido Thank you for your quick reply. I added it manually and it worked fine.

unotovive avatar Oct 04 '21 12:10 unotovive

@jesielviana @unotovive @border-1px There is a workaround by installing this package vite-svg-loader and adding a vite.config.js on your project

import svgLoader from 'vite-svg-loader'

export default {
  plugins: [svgLoader()],
}

I will try to investigate if there is a way of having this by default when installing instead of adding it manually. Let me know if it works I just tested it.

adding the svg loader helped!

lyqht avatar Nov 04 '21 05:11 lyqht

When importing another svg file to display with a img tag, using svg-loader is breaking the build because the svg file included with the <img/> tag couldn't be imported right. Do you have any ideas to resolve this issue?

diepoe avatar Jan 17 '22 18:01 diepoe