react-quill crashes app during production build

Created on 27 Mar 2018  路  5Comments  路  Source: zenoamaro/react-quill

Development build and webpack-dev-server
screenshot from 2018-03-28 01-49-58

Production build (including on heroku)
TypeError: t.isBuffer is not a function
screenshot from 2018-03-28 01-52-32

I'm assuming the problem is with my code and not with react-quill, but I don't know where to start debugging this.

Let me know if you want to see other files (such as the webpack.config file). Any thoughts welcome!

React-Quill version

  • [X] 1.2.6

Most helpful comment

Hi,

I was facing the same issue yesterday as well and I've managed to fix the problem by following the advices from the quill.js issue section https://github.com/quilljs/quill/issues/2018 and also installing an updated version of uglify https://github.com/webpack-contrib/uglifyjs-webpack-plugin

Version I am using:
"react": "^16.2.0", "webpack": "^3.11.0", "react-quill": "^1.2.6",

Instead of my old webpack.config.js which doesn't work:

module.exports = { plugins: [ new webpack.optimize.UglifyJsPlugin({sourceMap: true}), ] }

I npm installed uglifyjs-webpack-plugin with:

npm i -D uglifyjs-webpack-plugin

And my changed my webpack.config.js to:

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = { plugins: [ new UglifyJsPlugin({sourceMap: true}), ] }

I hope this helps you.

Cheers

All 5 comments

Hi,

I was facing the same issue yesterday as well and I've managed to fix the problem by following the advices from the quill.js issue section https://github.com/quilljs/quill/issues/2018 and also installing an updated version of uglify https://github.com/webpack-contrib/uglifyjs-webpack-plugin

Version I am using:
"react": "^16.2.0", "webpack": "^3.11.0", "react-quill": "^1.2.6",

Instead of my old webpack.config.js which doesn't work:

module.exports = { plugins: [ new webpack.optimize.UglifyJsPlugin({sourceMap: true}), ] }

I npm installed uglifyjs-webpack-plugin with:

npm i -D uglifyjs-webpack-plugin

And my changed my webpack.config.js to:

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
module.exports = { plugins: [ new UglifyJsPlugin({sourceMap: true}), ] }

I hope this helps you.

Cheers

Hey Jason,

It worked! Thanks so much for your help!!

--Andrew

I had fixed this issue with @jasonlow90 fix and it worked until today. Now all of a sudden I am getting the same error again. Anyone else?

for me with wepack 3.10.0 it worked as combination of answer above, but with package downgrade:
npm i -D uglifyjs-webpack-plugin@^1.0.0
and plus this

module: {
        noParse : '/node_modules\\/quill\\/dist/'
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nazanin1369 picture Nazanin1369  路  4Comments

alexkrolick picture alexkrolick  路  4Comments

LiuChangFreeman picture LiuChangFreeman  路  3Comments

prosenjitchy picture prosenjitchy  路  3Comments

ycjcl868 picture ycjcl868  路  5Comments