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

elmPackages - broken nodejs builds #152745

Closed
turboMaCk opened this issue Dec 30, 2021 · 7 comments · Fixed by #152764
Closed

elmPackages - broken nodejs builds #152745

turboMaCk opened this issue Dec 30, 2021 · 7 comments · Fixed by #152764
Assignees

Comments

@turboMaCk
Copy link
Member

Nodejs packages packaged using node2nix in elmPackages are currently broken (master/unstable). Issue seems to be similar to svanderburg/node2nix#236

Full error
npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/elm-review failed: cache mode is 'only-if-cached' but no cached response is available.

npm ERR! A complete log of this run can be found in:
npm ERR!     /build/.npm/_logs/2021-12-30T16_17_28_553Z-debug.log

error: builder for '/nix/store/sf6nk3pxrh7jb7h6k5dsaj1aakrav81c-elm-test-0.19.1-revision7.drv' failed with exit code 1;
       last 10 log lines:
       > npm WARN old lockfile     at async fetch (/nix/store/8acnc0m7m0m8jxcdhxdvyfqq8hav0a4f-nodejs-16.13.1/lib/node_modules/npm/node_modules/make-fetch-happen/lib/fetch.js:82:7)
       > npm WARN old lockfile     at async Array.<anonymous> (/nix/store/8acnc0m7m0m8jxcdhxdvyfqq8hav0a4f-nodejs-16.13.1/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:741:9) {
       > npm WARN old lockfile   code: 'ENOTCACHED'
       > npm WARN old lockfile }
       > npm ERR! code ENOTCACHED
       > npm ERR! request to https://registry.npmjs.org/elm-review failed: cache mode is 'only-if-cached' but no cached response is available.
       > 
       > npm ERR! A complete log of this run can be found in:
       > npm ERR!     /build/.npm/_logs/2021-12-30T16_17_28_553Z-debug.log
       > 
       For full logs, run 'nix log /nix/store/sf6nk3pxrh7jb7h6k5dsaj1aakrav81c-elm-test-0.19.1-revision7.drv'.

It seems that npm is trying to download dependencies over network.

@turboMaCk turboMaCk self-assigned this Dec 30, 2021
@jerith666
Copy link
Contributor

You probably already know this, but in case it's helpful, I started bisecting this last night and just finished: 4c60ee3 is the first bad commit.

@turboMaCk
Copy link
Member Author

I did not know that. That's very helpful, thanks @jerith666

I had a feeling that it must be related to bump of nodejs version. I'm not even sure if node2nix version from does support node 16 - see svanderburg/node2nix#274

I think what we might try is to decouple ourselves from env file defined in node packages.

@jerith666
Copy link
Contributor

Note that commit overrides nodePackages to use nodejs-14_x; perhaps we can do something similar in elmPackages?

@turboMaCk
Copy link
Member Author

yes I just pulled nixpkgs from upstream locally to test if we can still use node-env from node-packages. I'm still generating nix expressions.

@turboMaCk
Copy link
Member Author

for the records this is PR that fixes nodePackages #149120

@turboMaCk
Copy link
Member Author

Just in case you work on this in parallel @jerith666 I've got the fix already. I just need to do a bit more testing and polishing before I open PR. I'll tag you for review.

@jerith666
Copy link
Contributor

Thanks; I paused my investigation once I found this issue. I'll keep an eye out for your PR! :)

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

Successfully merging a pull request may close this issue.

2 participants