ijs / webp-webpack-plugin

webpack plugin for making webp format file
https://ijs.github.io/webp-webpack-plugin/
MIT License
40 stars 7 forks source link

TypeError: Cannot read property 'existsAt' of undefined #1

Closed achmadk closed 7 years ago

achmadk commented 7 years ago

I use your plugin to generate webp images. I am using latest version of webpack (v3.4.0). Unfortunately, I got error message like this.

I:\sample\node_modules\webpack\lib\Compiler.js:342
                                        if(source.existsAt === targetPath) {
                                                 ^

TypeError: Cannot read property 'existsAt' of undefined
    at Compiler.writeOut (I:\sample\node_modules\webpack\lib\Compiler.js:342:15)
    at I:\VHIEARCH_PROJECTS\sample\mkdirp\index.js:48:26
    at FSReqWrap.oncomplete (fs.js:123:15)
Zyclotrop-j commented 7 years ago

' had similar problems, ' prepared a pull-request to solve the problems: https://github.com/jiangtao/webp-webpack-plugin/pull/2.

leotm commented 6 years ago

I'm still getting this issue.

jiangtao commented 6 years ago

@leotm Please tell me your reappear steps.

leotm commented 6 years ago

Thanks for the speedy reply @jiangtao .

At the start of my webpack.config.js, I added var StartServerPlugin = require('start-server-webpack-plugin'); after my other plugins, before the module.exports part.

Similarly, in the module.exports.plugins array, I added new StartServerPlugin({}) after my other plugins. This gives no errors.

But e.g. new StartServerPlugin({name: 'server.js'}) throws the TypeError.

I also created an empty server.js in the same directory as webpack.config.js.

sarink commented 5 years ago

I had this happen when my entry file was incorrect, double check it!