tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.39k stars 89 forks source link

Error when trying to build VS Code extension with Nix #893

Closed ebresafegaga closed 1 year ago

ebresafegaga commented 1 year ago

Describe the bug Currently, when we try to build Nickel's VS Code extension with Nix:

 nix build "./#vscodeExtension.vsix"

It fails with the following error:

 last 10 log lines:
 > npm WARN old lockfile     at async RegistryFetcher.manifest (/nix/store/sndm8q6yhr6a8yy9zdd1sxni3lc8pcmw-nodejs-18.8.0/lib/node_modules/npm/node_modules/pacote/lib/registry.js:124:23)
 > npm WARN old lockfile     at async Array.<anonymous> (/nix/store/sndm8q6yhr6a8yy9zdd1sxni3lc8pcmw-nodejs-18.8.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:784:9) {
 > npm WARN old lockfile   code: 'ENOTCACHED'
 > npm WARN old lockfile }
 > npm ERR! code ENOTCACHED
 > npm ERR! request to https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz 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/2022-10-26T16_35_58_676Z-debug-0.log
 > 

Expected behavior It should build correctly without any errors. We should also have a CI job to build the extension automatically, and make the artifact (.vsix) available for download.

Additional context This might be caused by npm2nix

jmgilman commented 1 year ago

Can confirm I'm also seeing this on an x86_64-linux NixOS system. Unfortunately, I've come across this error before, and I was never able to figure out the root cause (if you Google it, you'll see a ton of open issues around it).