当前位置:网站首页>Solve NPM compilation times node_ modules/optipng-bin/vendor/optipng ENOENT

Solve NPM compilation times node_ modules/optipng-bin/vendor/optipng ENOENT

2022-06-12 20:01:00 kainx

The phenomenon

perform npm run build times node_modules/optipng-bin/vendor/optipng ENOENT This mistake
The log is as follows

15:02:26  events.js:183
15:02:26        throw er; // Unhandled 'error' event
15:02:26        ^
15:02:26  Error: spawn node_modules/[email protected]@optipng-bin/vendor/optipng ENOENT
15:02:26      at _errnoException (util.js:1024:11)
15:02:26      at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
15:02:26      at onErrorNT (internal/child_process.js:372:16)
15:02:26      at _combinedTickCallback (internal/process/next_tick.js:138:11)
15:02:26      at process._tickCallback (internal/process/next_tick.js:180:9)
15:02:26  npm ERR! code ELIFECYCLE
15:02:26  npm ERR! errno 1
15:02:26  npm ERR! [email protected] build: `export NODE_ENV=production && webpack --display-error-details --config webpack.config.js && gulp check-code && gulp build`
15:02:26  npm ERR! Exit status 1
15:02:26  npm ERR! 
15:02:26  npm ERR! Failed at the [email protected] build script.
15:02:26  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
15:02:26  
15:02:26  npm ERR! A complete log of this run can be found in:

terms of settlement

https://github.com/panteng/wechat-h5-boilerplate/issues/5
Execute the following command to uninstall and reinstall gulp-imagemin Rely on it , You need to pay attention to the difference between versions

npm install node-gyp
npm uninstall gulp-imagemin
npm install gulp-imagemin

My version is 4.1.0 Is executed npm install [email protected] install , npm rebuild Orders might help, too , Decide whether to delete according to your own situation node_modules

原网站

版权声明
本文为[kainx]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202281514379889.html