vue-froala-wysiwyg
vue-froala-wysiwyg copied to clipboard
Module not found: Error: Can't resolve 'crypto' in 'C:\Users\Maduranga\Desktop\laravel\Kithu-Raawa\node_modules\froala-editor\js' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }' - install 'crypto-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "crypto": false }
WARNING in ./node_modules/froala-editor/js/plugins.pkgd.min.js 7:232951-232968 Module not found: Error: Can't resolve 'crypto' in 'C:\Users\Maduranga\Desktop\laravel\Kithu-Raawa\node_modules\froala-editor\js'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }' - install 'crypto-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "crypto": false }
You have to edit the package.json file in node_modules/froala-editor and add
"browser": { "crypto": false }
at the end of file
Editing a package file is not a viable option. Any plans to fix this?
in order to solve the issue
Add in app node_modules/react-scripts/config/webpack.config.js
module.exports = function (webpackEnv) {
return {
...
resolve: {
...
fallback: { // not present by default
"crypto": false,
"stream": false
}
}