Code Monkey home page Code Monkey logo

create-webcomp's People

Contributors

heybran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

create-webcomp's Issues

template-html-css-js 运行build 命令报错

您好 我也是一个对Web Components感兴趣的前端开发者。我是在B站发现您的项目的,国内关于WeB Components的资料很少,而您的视频和讲解我也受益匪浅,非常感谢。
问题是这样的,我单独运行了 template-html-css-js 这个项目(并没有运行整个REPO)。DEV 命令可以正常运行,但是 build 命令会报以下错误。请问您遇到过以下错误吗?

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

> [email protected] build
> vite build

vite v4.5.0 building for production...
✓ 6 modules transformed.
✓ built in 149ms
[vite:build-html] Unable to parse HTML; parse5 error code unexpected-character-in-unquoted-attribute-value
 at C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html:1:31
1  |  export default "<div><a href=\"https://vitejs.dev\" target=\"_blank\"><img class=\"logo vite\" alt=\"Vite logo\"> </a><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_components\" target=\"_blank\"><img class=\"logo vanilla web-components\" alt=\"Web Components logo\"></a><h1>Hello Vite & Web Components!</h1><div class=\"card\"><my-counter count=\"0\"></my-counter></div><p class=\"read-the-docs\">Click on the Vite or
Web Components logo to learn more</p></div>";
   |                                ^
file: C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html
error during build:
Error: Unable to parse HTML; parse5 error code unexpected-character-in-unquoted-attribute-value
 at C:/Users/Administrator/Desktop/template-html-css-js/src/components/my-app/index.html:1:31
1  |  export default "<div><a href=\"https://vitejs.dev\" target=\"_blank\"><img class=\"logo vite\" alt=\"Vite logo\"> </a><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Web_components\" target=\"_blank\"><img class=\"logo vanilla web-components\" alt=\"Web Components logo\"></a><h1>Hello Vite & Web Components!</h1><div class=\"card\"><my-counter count=\"0\"></my-counter></div><p class=\"read-the-docs\">Click on the Vite or
Web Components logo to learn more</p></div>";
   |                                ^
    at handleParseError (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37523:11)
    at Parser.onParseError (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37449:13)
    at Tokenizer._err (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1125:89)
    at Tokenizer._stateAttributeValueUnquoted (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:2687:22)
    at Tokenizer._callState (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1632:22)
    at Tokenizer._runParsingLoop (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1149:22)
    at Tokenizer.write (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:1174:14)
    at Function.parse (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:4856:26)
    at parse (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-f0c7dae0.js:7927:19)
    at traverseHtml (file:///C:/Users/Administrator/Desktop/template-html-css-js/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:37445:17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.