./src/img中的错误 - Webpack

时间:2016-06-21 17:32:54

标签: webpack

因此我遇到了webpack-image-loader的问题,它将不再正确加载图像。我不确定它有什么问题,但它会引发这些错误......

ERROR in ./src/img/logo.png
    Module build failed: TypeError: Cannot read property 'charCodeAt' of undefined
        at isBinary (/Users/chriscates/projects/web-frontend-assets/node_modules/is-svg/index.js:8:38)
        at module.exports (/Users/chriscates/projects/web-frontend-assets/node_modules/is-svg/index.js:19:10)
        at /Users/chriscates/projects/web-frontend-assets/node_modules/imagemin-svgo/index.js:8:7
        at Imagemin.use (/Users/chriscates/projects/web-frontend-assets/node_modules/image-webpack-loader/node_modules/imagemin/index.js:63:51)
        at Object.module.exports (/Users/chriscates/projects/web-frontend-assets/node_modules/image-webpack-loader/index.js:33:6)
     @ ./src/components/containers/routes/Signup.js 35:42-74

is-svg似乎是一个问题。我不确定我应该对这个问题做些什么。我修改了node_module以返回false ...它似乎有一个流问题:

ERROR in ./src/img/logo.png
Module build failed: TypeError: stream.on is not a function
    at Readable.wrap (/Users/chriscates/projects/web-frontend-assets/node_modules/readable-stream/lib/_stream_readable.js:740:10)
    at wrap (/Users/chriscates/projects/web-frontend-assets/node_modules/stream-combiner2/index.js:67:29)
    at combine (/Users/chriscates/projects/web-frontend-assets/node_modules/stream-combiner2/index.js:29:18)
    at Function.module.exports.obj (/Users/chriscates/projects/web-frontend-assets/node_modules/stream-combiner2/index.js:22:10)
    at Imagemin.createStream (/Users/chriscates/projects/web-frontend-assets/node_modules/image-webpack-loader/node_modules/imagemin/index.js:103:24)
    at Imagemin.run (/Users/chriscates/projects/web-frontend-assets/node_modules/image-webpack-loader/node_modules/imagemin/index.js:77:20)
    at Object.module.exports (/Users/chriscates/projects/web-frontend-assets/node_modules/image-webpack-loader/index.js:43:14)
 @ ./src/components/containers/routes/Index.js 29:42-74

有关如何调试此问题的任何线索?

0 个答案:

没有答案