When packaging, an error is displayed at a picture path
Syntax Error: Error: ‘D:\work\tiny-sample\src\frontend\web\packages\src-entry\node_modules\pngquant-bin\vendor\pngquant.exe’
It can be seen that the package pngquant-bin reports an error, and the package is derived from the dependency of image-webpack-loader, so the root cause is image-webpack-loader.
Solution: delete the dependency image-webpack-loader, and then reinstall it. If it doesn’t work, try a few more times.
npm uninstall image-webpack-loader
npm install image-webpack-loader
If it still fails, set the image for NPM and repeat the above two steps
Read More:
- [Solved] Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor‘
- [Solved] Temporary error: Error: spawn E:\vue3-vite\my-app\node_modules\esbuild\esbuild.exe ENOENT
- [Solved] error C:\Users\HP\Desktop\VueProject\vue_cli\node_modules\node-sass: Command failed.Exit code: 1
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/_@babel_runtim
- [Solved] Vue package error: Syntax Error: Error: Cannot find module ‘mozjpeg’
- Solution to build error in Vue project (error in static/JS)/vendor.xxxxx.js from UglifyJs)
- error in ./node_modules/@lit/reactive-element/decorators/state.jsModule parse failed: Unexpected
- [Solution] VUE.js Load a local image with parameters in the script
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment:
- [Solved] ERROR in ./node_modules/element-ui/lib/theme-chalk/fonts/element-icons.ttf
- [Solved] Vue Error: Syntax Error: TypeError: Cannot set properties of undefined (setting ‘XXX’)
- [Solved] Vue Error: Module build failed Error Node Sass version 6.0.1 is incompatible with ^4.0.0.
- [Solved] Uniapp project use vant icon Error: (module build failed from./node_modules/postcss loader/SRC/index)
- [Solved] electron project Package Error: spawn exe\dll ENOENT
- Vue mutui identify (Image Verification Code)
- [Solved] Syntax Error: Error: Node Sass does not yet support your current environment: OS X Unsupported archi
- Vue installs sass loader directly, and node sass reports an error
- [Solved] Vue uses webpack to package error: Createapp is not a function
- [Solved] Vue Project Error: Syntax Error: TypeError: this.getOptions is not a function