模块构建失败:错误:读取ECONNRESET

时间:2018-02-11 23:22:46

标签: node.js linux laravel npm vuejs2

我不知道如何处理这些错误。当我将laravel网站部署到服务器并运行npm run dev时,就会发生这种情况。在我的本地机器上,我没有这个错误,所以我完全糊涂=(

我正在使用:
Debian@8.9
nodejs@8.9.4
npm@5.6.0
laravel@5.4
vuejs@2.3.3

 ERROR  Failed to compile with 5 errors                                                         

 error  in ./resources/assets/images/bg-welcome.jpg

Module build failed: Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at Pipe.onread (net.js:615:25)

 @ ./~/vue-loader/lib/template-compiler?{"id":"data-v-127c868a"}!./~/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/views/Home.vue 222:13-51 234:13-51
 @ ./resources/assets/js/views/Home.vue
 @ ./resources/assets/js/routes.js
 @ ./resources/assets/js/app.js
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

 error  in ./resources/assets/images/posters/2.jpg

Module build failed: Error: Command failed: /var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/mozjpeg/vendor/cjpeg
/var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/mozjpeg/vendor/cjpeg: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory


    at Promise.all.then.arr (/var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/imagemin-mozjpeg/node_modules/execa/index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

 @ ./~/vue-loader/lib/template-compiler?{"id":"data-v-2ac4f506"}!./~/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/views/client/MyTracks.vue 124:13-53
 @ ./resources/assets/js/views/client/MyTracks.vue
 @ ./resources/assets/js/routes.js
 @ ./resources/assets/js/app.js
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

 error  in ./resources/assets/img/bg-welcome.jpg

Module build failed: Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at Pipe.onread (net.js:615:25)

 @ ./~/css-loader?{"url":true,"sourceMap":false}!./~/postcss-loader?{"sourceMap":false}!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?{"precision":8,"outputStyle":"expanded","sourceMap":true}!./resources/assets/sass/app.scss 4:249600-249632
 @ ./resources/assets/sass/app.scss
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

 error  in ./resources/assets/img/bg-welcome-clean.jpg

Module build failed: Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at Pipe.onread (net.js:615:25)

 @ ./~/css-loader?{"url":true,"sourceMap":false}!./~/postcss-loader?{"sourceMap":false}!./~/resolve-url-loader!./~/sass-loader/lib/loader.js?{"precision":8,"outputStyle":"expanded","sourceMap":true}!./resources/assets/sass/app.scss 4:284816-284854
 @ ./resources/assets/sass/app.scss
 @ multi ./resources/assets/js/app.js ./resources/assets/sass/app.scss

 error  in ./resources/assets/sass/app.scss

Module build failed: ModuleBuildError: Module build failed: Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at Pipe.onread (net.js:615:25)
    at runLoaders (/var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/webpack/lib/NormalModule.js:192:19)
    at /var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/loader-runner/lib/LoaderRunner.js:364:11
    at /var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/loader-runner/lib/LoaderRunner.js:230:18
    at context.callback (/var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /var/www/www-root/data/www/domain.com/releases/20180212002544/node_modules/img-loader/index.js:45:31
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

1 个答案:

答案 0 :(得分:2)

我猜您正在使用image-webpack-loader版本4.x吗?

如果是这样,我恐怕你现在需要恢复到3.6.0。