Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies and add node requirements #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FoxxMD
Copy link

@FoxxMD FoxxMD commented Apr 5, 2023

This PR addresses OS dependency issues and some QoL updates for users trying to install this project locally

Specify Node/NPM Version

Use the engines property in package.json to hint to developers what the minimum (or preferred) node/npm versions to use should be. I set the versions to minimum major version but they should preferably be set to LTS versions (16.20.0)

Also added an .nvmrc for convenience to set the node/npm version, if nvm is used.

Reduce Install Complexity/Dependency Issues

gulp-sass depends on node-sass which depends on building node-gyp which is notoriously error-prone if you don't have the exactly specific requirements for OS to use their prebuilt binaries. This can result in having to build node-gyp (takes forever, error prone) and building node-sass from source.

Instead, use the drop-in replacement gulp-dart-sass which does not have these dependencies.

Fix Gulp 3 errors on on older Node versions

Gulp 3 depends on a package, graceful-fs that patches native node.js fs module but that only works for node <11. To fix this update npm to >8 (node >16.14) in order to use overrides property in package.json in order to force graceful-fs to a major version that does not do the patch.

* Replace gulp-sass with gulp-dart-sass to remove python2 and node-gyp dependencies
* Override graceful-fs to fix gulp error https://stackoverflow.com/a/58394828
  * Update(?) to npm>=8 in order to use overrides field
* Add node/npm version to package engine property
* Include nvmrc for convenience
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant