error in ./static/img/warehouse2.jpg Module build failed: Error: Cannot find module ‘imagemin-png
程序员文章站
2022-05-13 21:10:21
...
最近启动项目突然进行报错
error in ./node_modules/vue-piczoom/src/rotate.png
Module build failed: Error: Cannot find module 'imagemin-pngquant'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.module.exports (E:\work\carNiu\cattle_and_cattle\node_modules\image-webpack-loader\index.js:72:20)
@ ./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-21c78c49","scoped":true,"hasInlineConfig":false}!./node_modules/vue-piczoom/node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/vue-piczoom/src/components/PicZoom.vue 7:807-831 7:1234-1258
@ ./node_modules/vue-style-loader!./node_modules/css-loader?{"sourceMap":true}!./node_modules/vue-loader/lib/style-compiler?{"vue":true,"id":"data-v-21c78c49","scoped":true,"hasInlineConfig":false}!./node_modules/vue-piczoom/node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./node_modules/vue-piczoom/src/components/PicZoom.vue
@ ./node_modules/vue-piczoom/src/components/PicZoom.vue
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/components/vinDetailpage.vue
@ ./src/components/vinDetailpage.vue
@ ./src/router/routers.js
@ ./src/router/index.js
@ ./src/utils/axios.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8089 webpack/hot/dev-server babel-polyfill ./src/main.js
error in ./static/img/warehouse2.jpg
Module build failed: Error: Cannot find module 'imagemin-pngquant'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
at Function.Module._load (internal/modules/cjs/loader.js:506:25)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.module.exports (E:\work\carNiu\cattle_and_cattle\node_modules\image-webpack-loader\index.js:72:20)
@ ./node_modules/css-loader??ref--5-1!./node_modules/postcss-loader/lib??ref--5-2!./static/css/global.css 7:14171-14203 7:14251-14283 7:14402-14434
@ ./static/css/global.css
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8089 webpack/hot/dev-server babel-polyfill ./src/main.js
折腾了将近一小时各种npm install imagemin-pngquant均无效
神奇的是进行以下操作项目正常运行了
cnpm install imagemin-pngquant
推荐阅读
-
Module build failed: Error: Cannot find module 'node-sass’
-
Module build failed: Error: Cannot find module 'node-sass' at Function.Module._resolveFilename (
-
vue项目报错:”Module build failed: Error: Cannot find module ‘node-sass‘报错问题
-
npm run dev 报错 Module build failed: Error: Cannot find module 'prettier'
-
Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
-
Error: Loading PostCSS Plugin failed: Cannot find module 'autoprefixer'
-
ionic build -- prod Error: Cannot find module ‘@angular/compiler-cli/ngtools2‘
-
Module build failed: Error: Cannot find module 'node-sass'
-
解决Module build failed: Error: Cannot find module ‘node-sass‘Require stack
-
Module build failed: Error: Cannot find module 'node-sass'