• home > tools > Bundler > vite >

    vitepress build error: TypeError: Invalid value used as weak map key

    Author:zhoulujun Date:

    无论是vitepresss 还是vuepresss,都会报错:TypeError: Invalid value used as weak map keyTypeError:Invalidvalueusedasweakmap

    无论是vitepresss 还是vuepresss,都会报错:

    TypeError: Invalid value used as weak map key

    TypeError: Invalid value used as weak map key
        at WeakMap.set (<anonymous>)
        at normalizePropsOptions (dir-of-manv/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js:2215:15)
        at createComponentInstance (dir-of-manv/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js:5046:23)
        at renderComponentVNode (dir-of-manv/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:180:22)
        at ssrRenderComponent (dir-of-manv/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:606:12)
        at ssrRender (dir-of-manv/docs/.vuepress/dist/.server/334.app.js:71:48)
        at script.ssrRender (dir-of-manv/docs/.vuepress/dist/.server/334.app.js:176:10)
        at renderComponentSubTree (dir-of-manv/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:246:13)
        at renderComponentVNode (dir-of-manv/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:197:16)
        at renderVNode (dir-of-manv/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:287:22)

    网上搜了下,是因为<font>标签


    实际是:代码中存在不可以被识别或者存在的标签导致!


    参考内容:

    Vuepress2.x 编译报错 TypeError: Invalid value used as weak map key https://blog.csdn.net/sinat_31213021/article/details/119449772

    [vue3] vuepress2 在打包的时候出现 TypeError: Invalid value used as weak map key https://juejin.cn/post/6998730879191220238



    转载本站文章《vitepress build error: TypeError: Invalid value used as weak map key》,
    请注明出处:https://www.zhoulujun.cn/html/tools/Bundler/vite/8847.html