Page MenuHomePhabricator

[Nix] Pin node to 16.13.0
ClosedPublic

Authored by jon on Jul 14 2022, 2:56 PM.
Tags
None
Referenced Files
F3385792: D4542.diff
Fri, Nov 29, 2:18 AM
Unknown Object (File)
Mon, Nov 25, 3:37 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:28 PM
Unknown Object (File)
Fri, Nov 8, 8:10 AM

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.