Page MenuHomePhabricator

[Nix] Pin node to 16.13.0
ClosedPublic

Authored by jon on Jul 14 2022, 2:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 29, 11:41 PM
Unknown Object (File)
Sat, Jun 29, 6:30 AM
Unknown Object (File)
Thu, Jun 27, 12:27 AM
Unknown Object (File)
Tue, Jun 25, 12:01 PM
Unknown Object (File)
Mon, Jun 24, 5:50 PM
Unknown Object (File)
Sat, Jun 22, 10:40 PM
Unknown Object (File)
Fri, Jun 21, 5:14 PM
Unknown Object (File)
Fri, Jun 21, 5:14 PM

Details

Summary

Pin node to 16.13.0 to avoid import changes

https://linear.app/comm/issue/ENG-1391

Test Plan
nix develop
cd keyserver
yarn build-prod && yarn prod

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

To be completely honest, this is failing for me because of a different error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/jon/comm/comm/keyserver/dist/keyserver' imported from /home/jon/comm/comm/keyserver/

But it does remove the (node:1581718) ExperimentalWarning: --experimental-loader is an experimental feature warning, and yarn is using the correct version of node:

$ yarn node --version
yarn node v1.22.19
v16.13.0
Done in 0.03s.
jon edited the summary of this revision. (Show Details)

This looks reasonable to me, but I don't "know nix."

nix/overlay.nix
40 ↗(On Diff #14506)

nit: It's 16.14 that introduced this requirement

This revision is now accepted and ready to land.Jul 14 2022, 5:36 PM
jon added inline comments.
nix/overlay.nix
40 ↗(On Diff #14506)

Ah, I must have misread then

This revision was automatically updated to reflect the committed changes.

To be completely honest, this is failing for me because of a different error:

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/jon/comm/comm/keyserver/dist/keyserver' imported from /home/jon/comm/comm/keyserver/

yarn prod is probably failing because there is nothing in keyserver/dist. Node can't handle the files in keyserver/src directly... it needs Babel to transpile them into keyserver/dist first. yarn dev handles this for you automatically, but yarn prod needs you to handle it yourself by running yarn prod-build first. One way to learn more about the production build workflow is to take a look at keyserver/Dockerfile here.

But it does remove the (node:1581718) ExperimentalWarning: --experimental-loader is an experimental feature warning

That warning should still be present. I suspect it's missing because the above error causes a crash before the warning can be printed.