memoLee's avatar

There is two package.json file. What should I do?

I have a project builded with laravel and need to add a template. But the template has own package.json node_modules etc.

What is the right way the handling this issue. Any help appreciated.

0 likes
8 replies
cmdobueno's avatar

Combine the package.json. You really dont have any other choice...

Im sure somewhere there is a cool tool to do it for you, but worst case you just manually merge the two files into a super awesome cool file... then run npm install

nodE_models means nothings, they will get a fresh copy installed.

memoLee's avatar

Thank you for your answer. But what about saas and js files of template ?

memoLee's avatar

These files not compiled files . Do I need that ?

Cronix's avatar

They don't have to be compiled. All merge does is exactly what it says...merges 2 or more files into a single file. Like I take all of my vendor css files and merge them into a single vendor.css file.

memoLee's avatar

Got it but with what ? webpack ? Also how can I merge two of package.json files?

Cronix's avatar

Got it but with what ? webpack ?

Yes, with laravel mix (which uses webpack). https://laravel.com/docs/5.7/mix

But the template has own package.json node_modules etc.

Mind giving a link to that? I've never heard of a package having 2 separate package.json files.

Please or to participate in this conversation.