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 Node.js to active LTS version #2021

Closed
2 tasks
lfdebrux opened this issue Jan 18, 2022 · 3 comments · Fixed by #2110
Closed
2 tasks

Update Node.js to active LTS version #2021

lfdebrux opened this issue Jan 18, 2022 · 3 comments · Fixed by #2110

Comments

@lfdebrux
Copy link
Member

lfdebrux commented Jan 18, 2022

What

Update the project to use the latest active Long Term Support (LTS) version of Node.js for development, testing, and deployment.

Why

This project currently uses Node.js version 14, which has been in maintenance since last October (2021-10-19) and won't receive new features.

Who needs to work on this

Developer

Who needs to review this

Developer, Tech lead

Done when

  • Update .nvmrc
  • Update package-lock.json to use lockfile v2
@domoscargin
Copy link
Contributor

We've encountered some issues with this change on Mac M1 devices. They appear to related to node-sass, which we use in our tests and with gulp-sass.

gulp-sass will not support M1 chips with the node-sass compiler.

We've managed to get this working on M1 machines by deleting node_modules, then running:

nvm use
npm uninstall node-sass -g && npm cache clean -force && npm install node-sass
nvm use
npm install

Current theories are that the issue might be related to installing with Node v14, then installing this change, and something going awry in the switch. We're going to test installing straight from this branch and see if a clean install works.

We're then going to decide whether:

  • We stick to Node 14 for a while
  • We push the Node 16 update and document these steps for devs to troubleshoot any issues
  • We look at switching to dart-sass

@domoscargin
Copy link
Contributor

Additionally, after updating to Node 16, metalsmith-tagcleaner generates a warning during npm install:

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'metalsmith-tagcleaner@0.0.2',
npm WARN EBADENGINE   required: { node: '>=4.00' },
npm WARN EBADENGINE   current: { node: 'v16.14.0', npm: '8.3.1' }
npm WARN EBADENGINE }

metalsmith is now being actively developed: metalsmith/metalsmith#365

So it's possible we might be able to drop this extension or get an updated version at some point.

Alternatively, we may want to look at alternatives to metalsmith.

@webketje
Copy link
Contributor

@domoscargin FWIW there is now an official @metalsmith/sass package you can use to replace metalsmith-sass (which uses node-sass under the hood). It uses Dart sass as in your proposed solution and config changes should be minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants