vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

vue-cli 4.x -->upgrade 5.0.8 Module not found: Error: Can't resolve 'vue-hljs' in 'D:\develop #7447

Closed hbsjmsjwj closed 10 months ago

hbsjmsjwj commented 10 months ago

Version

5.0.8

Environment info

  "vue": "^3.2.11",
"vue-hljs": "^3.0.1",
"@vue/cli-plugin-babel": "~5.0.8",
    "@vue/cli-plugin-eslint": "~5.0.8",
    "@vue/cli-plugin-router": "~5.0.8",
    "@vue/cli-plugin-typescript": "~5.0.8",
    "@vue/cli-plugin-vuex": "~5.0.8",
    "@vue/cli-service": "~5.0.8",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-typescript": "^9.1.0",

Steps to reproduce

将cli 4.x升级到5.0.8后运行报错

What is expected?

yarn run dev正常运行

What is actually happening?

ERROR in ./src/main.ts 21:0-31 Module not found: Error: Can't resolve 'vue-hljs' in 'D:\develop\

hbsjmsjwj commented 10 months ago

因为vue-hljs的package.json里面的exports错误导致 image