Syntax Error: Error: Cannot find module 'mozjpeg'
The main reason is that some dependencies of image webpack loader
are not installed successfully, which makes the processing of pictures report errors
Attempting to install dependencies:
npm install mozjpeg
report errors:
connect ECONNREFUSED 0.0.0.0:443
mozjpeg pre-build test failed
You can solve this problem by modifying hosts.
Modify hosts for MAC system
https://github.com/googlehosts/hosts
Go to this website to download files
open the terminal, enter open/etc
and paste the hosts into the etc folder to replace the original hosts file.
The reinstallation was successful and the packaging was successful.
Read More:
- The vue3 project Error: Cannot find module’vue-loader-v16/package.json’
- [Solved] Syntax Error: Error: Cannot find module ‘@vue/babel-preset-app‘
- Vue project Run Error: Syntax Error: Error: Cannot find module ‘less‘
- [Solved] Vue Install loader Error: Syntax Error: Error: Cannot find module ‘less‘
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils
- [Solved] Error: Cannot find module ‘@vue/cli-shared-utils‘
- [Solved] Syntax Error: Error: Cannot find module ‘cache-loader‘
- [webpack-cli] Error: Cannot find module ‘vue/compiler-sfc‘
- [Solved] Error: Cannot find module ‘vue-template-compiler/package.json‘ Require stack:
- Syntax Error: Error: Cannot find module ‘less‘ [How to Solve]
- [Solved] Syntax Error: Error: Loading PostCSS Plugin failed: Cannot find module ‘autoprefixer‘
- When starting Vue project: cannot find module ‘webpack cli/bin/config yargs’ error resolution
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- Vue Package Image Error: Syntax Error: Error: ‘**\node_modules\pngquant-bin\vendor\pngquant.exe‘
- [Solved] ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
- [Solved] Warning: To load an ES module, set “type“: “module“ in the package.json or use the .mjs extension
- [Solved] Vue Route Error: Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_42__.defineComponent) is not a function
- How to Solve Vue cli syntax Close Error
- [Solved] Vue unit test syntax error: unexpected token ‘export‘
- How to Solve Nodejs error: cannot find module ‘. /application’