hoverbover's avatar

Dependencies incompatible with new upgrades (for example babel 7)

Hi!

I'm looking for some advice regarding dependencies, because my package.json dependencies don't seem to be in sync. After some problems appeared, I started to upgrade some packages, the biggest change going from laravel mix 4 to 6. I made the changes in webpack mix file but there are some other errors.

There is the error "cannot find module 'babel-plugin-transform-object-rest-spread'" This originates from the package "form-backend-validation" whose latest version is 2.4, and it uses @babel/preset-es2015. So in its package.json, babel plugins are included like:

"devDependencies": { 
    "babel-plugin-transform-object-rest-spread": "^6.16.0",

So I guess that is incompatible with laravel mix 6 , which uses babel 7, where you now need to include babel plugins in a different way:

@babel/babel-plugin-transform-object-rest-spread

I also have the package summernote which uses "@babel/preset-env": "^7.9.5", but it has the dependency: "babel-plugin-module-resolver" which causes an error for me. There might be some knowledge Im missing here, in that case it would be great if you can point it out!

But what is the way forward? Should I go in to those dependencies which doesn't support babel 7 and change the source package.json and do a "npm install" in that folder(?) Or should I make some kind of "fork" of those dependencies and replace it , and update my code to import that version instead?

0 likes
0 replies

Please or to participate in this conversation.