philicevic / mix-html-builder

A quick laravel mix extension to build up html templates from partials and layouts.
MIT License
19 stars 8 forks source link

Can't install with Laravel Mix 6.0.2 #29

Closed goaround closed 3 years ago

goaround commented 3 years ago

Hi,

with "laravel-mix": "^6.0.2", I can't install "mix-html-builder": "^0.7.0" because laravel mix is locked at >=3.0.0 <=6.0.0

"peerDependencies": {
    "laravel-mix": ">=3.0.0 <=6.0.0"
},

I would suggest to change it to


"peerDependencies": {
    "laravel-mix": "^6.0.0"
},

for the latest Version?

kevinruscoe commented 3 years ago

Urgh, you're right. This is my fault.

^6.0.0 would work, but the package works with >=3, so ^6.0.0 would constraint it too much. I don't know enough about constraints, but would ">=3 <7" work? Does that mean 3 or above (like 3.0.0, 3.4.5, 3.7.0, etc), but below 7 (like 6.9.0, 6.69, 6.0.0)?

goaround commented 3 years ago

I don't know enough about constraints, too but ">=3 <7" sound fine for me.

kevinruscoe commented 3 years ago

Actually, I just installed a clean mix installation, and it worked as is? It warns during installation (npm WARN mix-html-builder@0.7.0 requires a peer of laravel-mix@>=3.0.0 <=6.0.0 but none is installed. You must install peer dependencies yourself.) but it installs fine, and running npx mix successfully builds. I'm using mix 6.0.6.

But, I do think we need to sort the contraints out.

goaround commented 3 years ago

Yes you are right here. It's just warning not an error. Found this out after I created the Issue.

ouestdarq commented 3 years ago

estuardoquan@Estuardos-MacBook-Pro social-network % npm install npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! Found: laravel-mix@6.0.9 npm ERR! node_modules/laravel-mix npm ERR! dev laravel-mix@"^6.0.9" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer laravel-mix@">=3.0.0 <=6.0.0" from mix-html-builder@0.7.0 npm ERR! node_modules/mix-html-builder npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

this is my output after running ncu -u and npm install... I'm really lost here as to what has to be done... where would I change the peer dependencies? or how do I clean install, because, removing the node_modules folder and running npm install does the same thing....