smartXJ / vue3-inset-loader

编译阶段在sfc模板指定位置插入自定义内容
17 stars 2 forks source link

不清楚哪里出问题了 #6

Open IAtone opened 5 months ago

IAtone commented 5 months ago

TypeError: Cannot read properties of undefined (reading 'start') 14:33:14.211 at createBlock (C:\Own\new\lipin-wxmini\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1992:31) 14:33:14.221 at C:\Own\new\lipin-wxmini\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1868:55 14:33:14.228 at Array.forEach () 14:33:14.234 at parse$2 (C:\Own\new\lipin-wxmini\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1858:16) 14:33:14.242 at Object.transform (C:\Own\new\lipin-wxmini\vite.config.js:135:30) 14:33:14.248 at file:///C:/App/HBuilderX/HBuilderX/plugins/uniapp-cli-vite/node_modules/rollup/dist/es/shared/node-entry.js:25544:40

IAtone commented 5 months ago

npm 安装了"devDependencies": { "@vue/compiler-sfc": "^3.4.29", "strip-json-comments": "^3.1.1" }, 这个插件也引入了 import vue3InsetLoaderPlugin from './plugins/vue3-inset-loader/index.js' export default defineConfig({ plugins: [vue3InsetLoaderPlugin, uni()],

smartXJ commented 5 months ago

把pages.json 文件多余的空格删掉

IAtone commented 5 months ago

把pages.json 文件多余的空格删掉

好的我试一下

smartXJ commented 5 months ago

抱歉之前说错了,把pages.json 文件多余的逗号删掉

IAtone commented 5 months ago

抱歉之前说错了,把pages.json 文件多余的逗号删掉

没有多余的逗号吧,有的话json文件就报错了

Stay-optimistic commented 4 months ago

我的也报错无法运行,按步骤来的 yarn run v1.22.22 warning package.json: No license field warning package.json: "dependencies" has dependency "recorder-core" with range "^1.3.24040900" that collides with a dependency in "devDependencies" of the same name with version "^1.3" $ uni -p mp-weixin 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布 正在编译中... error during build: TypeError: Expected argument jsonString to be a string, got undefined at module2.exports (/Users/guanfushang/Desktop/guan/yunyizhineng/project/cloudyi-mobile-white/vite.config.ts:52:15) at filterPlugin (file:///Users/guanfushang/Desktop/guan/yunyizhineng/project/cloudyi-mobile-white/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:63940:22) at Array.filter () at resolveConfig (file:///Users/guanfushang/Desktop/guan/yunyizhineng/project/cloudyi-mobile-white/node_modules/vite/dist/node/chunks/dep-934dbc7c.js:63951:71) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Module.build (file:///Users/guanfus