Page MenuHomePhabricator

[Nix] Pin node to 16.13.0
ClosedPublic

Authored by jon on Jul 14 2022, 2:56 PM.
Tags
None
Referenced Files
F2207905: D4542.id14505.diff
Sun, Jul 7, 10:24 AM
F2207904: D4542.id14504.diff
Sun, Jul 7, 10:23 AM
F2207857: D4542.id14506.diff
Sun, Jul 7, 10:03 AM
F2204626: D4542.id14533.diff
Sat, Jul 6, 5:06 PM
F2204625: D4542.id14506.diff
Sat, Jul 6, 5:06 PM
F2204378: D4542.id14531.diff
Sat, Jul 6, 4:02 PM
F2204376: D4542.id14505.diff
Sat, Jul 6, 4:02 PM
Unknown Object (File)
Sat, Jul 6, 12:45 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.