vue-froala-wysiwyg icon indicating copy to clipboard operation
vue-froala-wysiwyg copied to clipboard

Vue Froala and Laravel Mix - Cannot find module 'babel-runtime/core-js/json/stringify'

Open rolfo85 opened this issue 5 years ago • 14 comments

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?

rolfo85 avatar Apr 01 '19 21:04 rolfo85

i am using nuxt and same issue any help

imsidz avatar Apr 03 '19 06:04 imsidz

Just run:

npm install --save babel-runtime @babel/runtime-corejs2

sbmw avatar Apr 09 '19 04:04 sbmw

same here. @sbmw tip worked. thank you!

ven0ms99 avatar Apr 14 '19 10:04 ven0ms99

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 avatar Apr 15 '19 06:04 t202wes

@t202wes just run this npm install --save babel-runtime @babel/runtime-corejs2

imsidz avatar Apr 15 '19 06:04 imsidz

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 avatar Apr 15 '19 07:04 t202wes

@t202wes if you found image uploading setup please tell me

imsidz avatar Apr 15 '19 09:04 imsidz

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.

t202wes avatar Apr 15 '19 20:04 t202wes

@sbmw it works for me, thanks !!!

madawasuneth avatar May 08 '19 06:05 madawasuneth

@sbmw why does it need babel-runtime? Anyways, worked for me too

lexjwa avatar Aug 25 '19 12:08 lexjwa

I also would like to know why it needs babel-runtime ?

elfalem avatar Oct 09 '19 21:10 elfalem

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

BooVeMan avatar Sep 15 '20 08:09 BooVeMan

Please remove the .babelrc. This breaks code in environments which are dependent on core-js@3. Core-js2 is deprechated.

vectorjedi avatar Oct 13 '20 09:10 vectorjedi

What about the PR https://github.com/froala/vue-froala-wysiwyg/pull/67, can we please solve the merge conflicts and get this merged?

vectorjedi avatar Oct 13 '20 09:10 vectorjedi