Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'end' of undefined #329

Closed
xuelq007 opened this issue Aug 14, 2019 · 0 comments
Closed

TypeError: Cannot read property 'end' of undefined #329

xuelq007 opened this issue Aug 14, 2019 · 0 comments

Comments

@xuelq007
Copy link

xuelq007 commented Aug 14, 2019

Is there anyone meet below problem?

Reproduce Steps:

  1. run webpack, it fails with below error log. the error happens in one less file about background url.
  2. then I do nothing to the less file and just resave it to reload webpack, it compiles successfully.

my webpack config:

            use: [
                {
                    loader: 'url-loader',
                    options: {
                        limit: 1000,
                        outputPath: 'assets',
                        name: '[name].[hash:8].[ext]'
                    }
                },
                {
                    loader: 'image-webpack-loader',
                    options: {
                        mozjpeg: {
                            progressive: true,
                            quality: 65
                        },
                        optipng: {
                            enabled: true
                        },
                        pngquant: {
                            quality: '65-90',
                            speed: 4
                        },
                        gifsicle: {
                            interlaced: false
                        }
                    }
                }
            ]
        }
    ]

Error Log:

ERROR in ./src/pages/summit/summit2019/assets/nodata.png
Module build failed (from ./node_modules/image-webpack-loader/index.js):
TypeError: Cannot read property 'end' of undefined
at handleInput (/Users/xueliqiang/newBaidu/baidu/bce-portal/portal-server-v2/node_modules/imagemin-pngquant/node_modules/execa/index.js:89:17)
at module.exports (/Users/xueliqiang/newBaidu/baidu/bce-portal/portal-server-v2/node_modules/imagemin-pngquant/node_modules/execa/index.js:309:2)
at input (/Users/xueliqiang/newBaidu/baidu/bce-portal/portal-server-v2/node_modules/imagemin-pngquant/index.js:52:13)
at
@ ./src/pages/summit/summit2019/myTicket/main.less (./node_modules/css-loader!./node_modules/less-loader/dist/cjs.js??ref--5-2!./src/pages/summit/summit2019/myTicket/main.less) 7:2845-2876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant