vue-froala-wysiwyg
vue-froala-wysiwyg copied to clipboard
Vue Froala and Laravel Mix - Cannot find module 'babel-runtime/core-js/json/stringify'
I'm trying to install Vue froala on my Laravel project. I followed the exact instruction provided here: https://github.com/froala/vue-froala-wysiwyg but I get:
Cannot find module 'babel-runtime/core-js/json/stringify
Not sure if I have to touch the webpack.mix.js. I only try to add jQuery required by Froala. So now it looks like that: const mix = require('laravel-mix');
mix.webpackConfig(webpack => {
return {
resolve: {
extensions: ['.js', '.vue'],
alias: {
'@': __dirname + '/resources'
}
},
plugins: [
// ...
// Jquery loader plugin.
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
]
}
})
I found people fixing a similar problem manually installing babel-runtime as a package.json dependancy. I did, but it didn't work.
Any help?
i am using nuxt and same issue any help
Just run:
npm install --save babel-runtime @babel/runtime-corejs2
same here. @sbmw tip worked. thank you!
Doesn't work for me, what's wrong @froola?
RROR in ./node_modules/vue-froala-wysiwyg/es/vue-froala.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/json/stringify' in '/home/vagrant/mailsoft/node_modules/vue-froala-wysiwyg/es'
@ ./node_modules/vue-froala-wysiwyg/es/vue-froala.js 13:40-96
@ ./node_modules/vue-froala-wysiwyg/es/index.js
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/scss/app.scss ./resources/assets/website/scss/toolkit-startup.scss
ERROR in ./node_modules/vue-froala-wysiwyg/es/index.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/define-property' in '/home/vagrant/mailsoft/node_modules/vue-froala-wysiwyg/es'
@ ./node_modules/vue-froala-wysiwyg/es/index.js 5:29-93
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/scss/app.scss ./resources/assets/website/scss/toolkit-startup.scss
ERROR in ./node_modules/vue-froala-wysiwyg/es/vue-froala.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/core-js/object/define-property' in '/home/vagrant/mailsoft/node_modules/vue-froala-wysiwyg/es'
@ ./node_modules/vue-froala-wysiwyg/es/vue-froala.js 5:29-93
@ ./node_modules/vue-froala-wysiwyg/es/index.js
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/scss/app.scss ./resources/assets/website/scss/toolkit-startup.scss
ERROR in ./node_modules/vue-froala-wysiwyg/es/index.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/helpers/interopRequireDefault' in '/home/vagrant/mailsoft/node_modules/vue-froala-wysiwyg/es'
@ ./node_modules/vue-froala-wysiwyg/es/index.js 3:29-92
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/scss/app.scss ./resources/assets/website/scss/toolkit-startup.scss
ERROR in ./node_modules/vue-froala-wysiwyg/es/vue-froala.js
Module not found: Error: Can't resolve '@babel/runtime-corejs2/helpers/interopRequireDefault' in '/home/vagrant/mailsoft/node_modules/vue-froala-wysiwyg/es'
@ ./node_modules/vue-froala-wysiwyg/es/vue-froala.js 3:29-92
@ ./node_modules/vue-froala-wysiwyg/es/index.js
@ ./resources/assets/js/app.js
@ multi ./resources/assets/js/app.js ./resources/assets/scss/app.scss ./resources/assets/website/scss/toolkit-startup.scss
@t202wes just run this npm install --save babel-runtime @babel/runtime-corejs2
Thank you, that worked.
On Apr 14, 2019, at 23:50, imsidz [email protected] wrote:
@t202wes https://github.com/t202wes just run this npm install --save babel-runtime @babel/runtime-corejs2
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/froala/vue-froala-wysiwyg/issues/76#issuecomment-483128761, or mute the thread https://github.com/notifications/unsubscribe-auth/ACeJdX9LJpKGqoLpOTXtMhEOGdTqRFcPks5vhCElgaJpZM4cWqz7.
@t202wes if you found image uploading setup please tell me
No sorry. @imsidz
On Apr 15, 2019, at 02:00, imsidz [email protected] wrote:
@t202wes https://github.com/t202wes if you found image uploading setup please tell me
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/froala/vue-froala-wysiwyg/issues/76#issuecomment-483168423, or mute the thread https://github.com/notifications/unsubscribe-auth/ACeJdYsh7MZ0TAGcqgStQ-lR_1XDfWXKks5vhD--gaJpZM4cWqz7.
@sbmw it works for me, thanks !!!
@sbmw why does it need babel-runtime? Anyways, worked for me too
I also would like to know why it needs babel-runtime ?
more over why use the deprecated core-js2 when running the suggested fix (installing babel/runtime-corejs2) I'm flooded with deprecation warnings which doesn't bode well
Please remove the .babelrc. This breaks code in environments which are dependent on core-js@3. Core-js2 is deprechated.
What about the PR https://github.com/froala/vue-froala-wysiwyg/pull/67, can we please solve the merge conflicts and get this merged?