报错信息大概如下
Failed to compile with 15 errors 00:47:21
These dependencies were not found:
* codemirror/addon/dialog/dialog.css in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/dialog/dialog.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/scroll/annotatescrollbar.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/search/jump-to-line.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/search/match-highlighter.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/search/matchesonscrollbar.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/search/search.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/search/searchcursor.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/addon/selection/active-line in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/keymap/sublime in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/lib/codemirror.css in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/mode/javascript/javascript.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/mode/vue/vue.js in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* codemirror/theme/dracula.css in ./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/.pnpm/babel-loader@8.3.0_@babel+core@7.23.2_webpack@4.47.0/node_modules/babel-loader/lib!./node_modules/.pnpm/cache-loader@4.1.0_webpack@4.47.0/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/.pnpm/vue-loader@15.10.2_cache-loader@4.1.0_css-loader@3.6.0_vue-template-compiler@2.6.12_webpack@4.47.0/node_modules/vue-loader/lib??vue-loader-options!./src/views/cms/contentcore/templateEditor.vue?vue&type=script&lang=js&
* video.js/dist/video-js.css in ./src/main.js
To install them, you can run: npm install --save codemirror/addon/dialog/dialog.css codemirror/addon/dialog/dialog.js codemirror/addon/scroll/annotatescrollbar.js codemirror/addon/search/jump-to-line.js codemirror/addon/search/match-highlighter.js codemirror/addon/search/matchesonscrollbar.js codemirror/addon/search/search.js codemirror/addon/search/searchcursor.js codemirror/addon/selection/active-line codemirror/keymap/sublime codemirror/lib/codemirror.css codemirror/mode/javascript/javascript.js codemirror/mode/vue/vue.js codemirror/theme/dracula.css video.js/dist/video-js.css
解决办法文章来源:https://www.toymoban.com/news/detail-710735.html
pnpm install --shamefully-flatten
直接运行上面的命令,等待完成后,执行pnpm dev 启动项目即可 文章来源地址https://www.toymoban.com/news/detail-710735.html
到了这里,关于npm i 安装的依赖项目,运行正常,换成pnpm i安装的依赖运行报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!