pixelated / pixelated-user-agent

User facing components of Pixelated: a JavaScript single page app and a RESTful service.
GNU Affero General Public License v3.0
159 stars 72 forks source link

Split node modules into production and development groups #1076

Closed varac closed 7 years ago

varac commented 7 years ago

The rationale behind this is that we now a too complex dependency graphs of node modules (~1000 !). This breaks at least under certain circumstances like installing the modules on a shared folder inside vagrant.

varac commented 7 years ago

I encountered this installing a list of dependencies. It went away when i split the list of modules and ran two separate commands. I think we should do the same. Looks like the easiest solution so far. If somebody comes up with a sane split of modules list I'm happy to give it another try, because sshfs seems to be the filesystem when it breaks unrecoverably.

Not sure, If I understood the solution. How can we split the list of modules, if they are all in the package.json?

Unfortunatly, npm doesn't let you add your custom package groups, like i.e. bundler for ruby handle it.

But we could start splitting packages into dependencies and devdependencies.

I.e.:

from https://docs.npmjs.com/cli/install: "With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies."

We could first install the dependencies with npm install --production and after that the devdependencies with npm install

varac commented 7 years ago

^ Testing this branch now. It's just a proof of concept, I split up the modules into two parts without any logical order. If it's proven that this work, we could consider grouping them real into production/development lists.

varac commented 7 years ago

Tested successfully 1 time with nfs and 3 times with sshfs as shared folder backend.

tayanefernandes commented 7 years ago

@varac I tried to organize the npm libraries, but I am not able to test because of the symlink problem. Could test it to again, please? ☺️

varac commented 7 years ago

@tayanefernandes Installation works fine. But I'm blocked by the Cryptograhy/MultiBackend bug to test the functionality :(

varac commented 7 years ago

@tayanefernandes So I think you can merge the branch!