npm i 安装的依赖项目,运行正常,换成pnpm i安装的依赖运行报错

  • npm i 安装的依赖项目,运行正常,换成pnpm i安装的依赖运行报错已关闭评论
  • 109 次浏览
  • A+
所属分类:Web前端
摘要

报错信息大概如下 Failed to compile with 15 errors 00:47:21
These dependencies were not found:

报错信息大概如下

npm i 安装的依赖项目,运行正常,换成pnpm i安装的依赖运行报错

 

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

 

 

解决办法

pnpm install --shamefully-flatten

直接运行上面的命令,等待完成后,执行pnpm dev 启动项目即可