pnpm dev运行web,报错Failed to resolve entry for package "v-code-diff". The package may have incorrect main/module/exports specified in its package.json.

2个回答默认排序 投票数排序
微信18902317356
微信18902317356
益小蜂,网站、小程序、APP开发,技术公益。
5月前

是不是要提前运行一下,npm install

QQ10001
QQ10001
这家伙很懒,什么也没写~
1周前

关注。。。同意问题
群里不让AT,社区没人回复😭

kelow
kelow回复QQ10001
这家伙很懒,什么也没写~
1周前

查看node_modules v-code-diff 的 package.json 这个属于这个包更新的问题,没有把版本呢加上去
改成这样就可以了

"exports": {
    ".": {
      "types": "./types/index.d.ts",
      "import": "./dist/v3/index.es.js",
      "require": "./dist/v3/index.cjs.js"
    }
  },
  "main": "dist/v3/index.cjs",
  "module": "dist/v3/index.es.js",
  "types": "./types/index.d.ts",
请先登录
0
1
0
3