when run
ionic start project template
there alway directory node_modules that have same modules in all projects
how to make it modules global an not trash project folder?
My advice is: get a bigger disk. Once you have a few different projects going at the same time, they are all going to have different dependencies. And a library could introduce a breaking change at any time, so different projects won’t all be running the same version of a library.
That’s how JS development with npm
works. Using workarounds will cause you pain with not very much benefits. Don’t do it.
Do Ionic projects keep library version in config files so I don’t have to upload the whole node_modules folder to a git hub repository??
Look at package.json
.
Make sure this doesn’t happen. Ionic projects by default have node_modules in .gitignore. Leave that alone.
If you’re using npm 5.x, commit package.lock.json
to git. (Should happen automatically, at least it does in bitbucket, which I use.) That is a lightweight representation of dependency files.
Thanks @rapropos @AaronSterling I’ll follow your notes