| 10 Aug 2023 |
countoren | does buildNpm give you ability to define it in nix? | 18:51:06 |
Lily Foster | Ah, if it doesn't need to be built then you can just do dontNpmBuild. But if you're needing to run a command to build, it might not be a bad idea to add it to the package.json | 18:51:16 |
Lily Foster | * Ah, if it doesn't need to be built then you can just do
`dontNpmBuild = true`. But if you're needing to run a command to build, it might not be a bad idea to add it to the package.json | 18:51:28 |
countoren | I think I will just add it | 18:51:41 |
Lily Foster | * Ah, if it doesn't need to be built then you can just do `dontNpmBuild = true`. But if you're needing to run a command to build, it might not be a bad idea to add it to the package.json | 18:51:43 |
countoren | should it be with npx? | 18:51:46 |
Lily Foster | It should probably be in devDependencies and then run without npx | 18:52:16 |
countoren | ng is in dev | 18:52:47 |
Lily Foster | Then yeah no npx needed | 18:52:59 |
Lily Foster | Just "scripts": { "build": "ng build" } in package.json I guess | 18:53:31 |
countoren | yes, that is basically what I did it has some more flaf. | 18:54:26 |
countoren | :/ :
npm verb cli /nix/store/y85811fai07h16xqwh99wnql0cwgb17c-nodejs-18.16.1/bin/node /nix>
npm info using npm@9.5.1
npm info using node@v18.16.1
npm verb logfile could not create logs-dir: Error: EACCES: permission denied, mkdir '>
npm verb title npm ci
npm verb argv "ci" "--ignore-scripts" "--loglevel" "verbose"
npm verb logfile logs-max:10 dir:/nix/store/ghzlmpp85mfshrh3biypxvhflxd92ld3-client-0>
npm verb logfile could not be created: Error: ENOENT: no such file or directory, open>
npm verb logfile no logfile created
...skipping...
at module.exports (/build/server/node_modules/webpack/lib/util/createHash.js:135:>
at NormalModule._initBuildHash (/build/server/node_modules/webpack/lib/NormalModu>
at /build/server/node_modules/webpack/lib/NormalModule.js:444:10
at /build/server/node_modules/webpack/lib/NormalModule.js:320:13
at /build/server/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /build/server/node_modules/loader-runner/lib/LoaderRunner.js:203:19
at VirtualFileSystemDecorator.readFile (/build/server/node_modules/@ngtools/webpa>
at processResource (/build/server/node_modules/loader-runner/lib/LoaderRunner.js:>
at iteratePitchingLoaders (/build/server/node_modules/loader-runner/lib/LoaderRun>
at iteratePitchingLoaders (/build/server/node_modules/loader-runner/lib/LoaderRun>
at /build/server/node_modules/loader-runner/lib/LoaderRunner.js:176:18
at loadLoader (/build/server/node_modules/loader-runner/lib/loadLoader.js:47:3)
at iteratePitchingLoaders (/build/server/node_modules/loader-runner/lib/LoaderRun>
at runLoaders (/build/server/node_modules/loader-runner/lib/LoaderRunner.js:365:2>
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization erro>
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
| 18:55:20 |
Lily Foster | Ah there should be a diagnostic message that says how to resolve openssl things after that in the log | 18:56:43 |
countoren | "build": "ng build fix1 --prod --source-map=false",
| 18:56:57 |
countoren | no | 18:57:10 |
Lily Foster | Something about openssl legacy providers. Let me go double check real quick | 18:57:36 |
countoren | no problem, Thank you | 18:57:49 |
Lily Foster | NODE_OPTIONS = "--openssl-legacy-provider" on the derivation | 18:58:06 |
countoren | right... | 18:58:17 |
Lily Foster | * `env.NODE_OPTIONS = "--openssl-legacy-provider"` on the derivation | 18:58:30 |
countoren | add it commented | 18:58:41 |
countoren | * had it commented | 18:58:55 |
countoren | Nice! GJ Lily Foster that was it. | 19:00:47 |
countoren | just need to finish wrapping it up nicely but the should be it | 19:01:26 |
Lily Foster | Oh good! I'm glad 🎉 | 19:01:49 |
Lily Foster | I'll PR the tokens thing now if it works. I might add some rust tests and docs first though | 19:02:05 |
countoren | I guess it should work as well if I add it as a normal ENV variable right? | 19:02:55 |
countoren | dont want to make it complex for the users | 19:03:36 |
countoren | another way will be a writeShellScript to load it to daemon. maybe this one is better. | 19:04:34 |
Lily Foster | Nix just doesn't have a good way to import an env var to the builder that doesn't leak it into the store during evaluation or involve setting it on the builder daemon conf | 19:05:17 |