Re:Open source maintainer pulls the plug on NPM packages col...
by Gigachad on Sunday January 09, 2022 @06:46PM
(#29868709)
The only thing that seems clear is that post about committing the whole node_modules folder to git was correct. Despite all the ridicule HN gave it.
[ Parent
| on HN ]
Re:Open source maintainer pulls the plug on NPM packages col...
by thefurrysquid on Monday January 10, 2022 @03:03AM
(#29871807)
YARN v2 onwards has Zero Install mode where you _do_ typically commit a cache folder to source control: https://yarnpkg.com/features/zero-installs
It can be a little tricky to get working with some tools, but it is very fast and doesn't take up as much repo space as you'd expect since the approach is much more efficient than node_modules.
Re:Open source maintainer pulls the plug on NPM packages col...
by joshspankit on Sunday January 09, 2022 @10:18PM
(#29870196)
An unfortunate solution because it might be the right one at the cost of maintainability and repo size
Re:Open source maintainer pulls the plug on NPM packages col...
by verdverm on Sunday January 09, 2022 @07:40PM
(#29869138)
Or you could use a lock file
Re:Open source maintainer pulls the plug on NPM packages col...
by Gigachad on Sunday January 09, 2022 @09:18PM
(#29869834)
Lockfile doesn't help here. The packages were yanked from the repos. The lockfile will tell your package manager to try to download a package that does not exist. Checking in the entire node_modules folder saves you since you don't need to fetch any external files.
Re:Open source maintainer pulls the plug on NPM packages col...
by SergeAx on Monday January 10, 2022 @05:20AM
(#29872699)
Good practive here is using package cache. It is not that hard to install, and your CI builds will save tons of trafic for you and for global package repos (Github, NPM, Packagist and so on)
Re:Open source maintainer pulls the plug on NPM packages col...
by verdverm on Monday January 10, 2022 @12:14PM
(#29878005)
Indeed, Go would not have failed here because the global package cache keeps deleted repos. Module authors cannot effect this
Other languages require you to run a cache and set proxy config up for the builders