n8n: 1.9.3 -> 1.46.0, repackage with pnpm.fetchDeps #319310
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since #290715 was merged, it's much easier to package and maintain pnpm projects.
Description of changes
node-env
,node-composition
stuff withpnpm.fetchDeps
andpnpm.configHook
oracledb
and@sap/hana-client
removal on aarch64: these don't exist in node_modules anymore and aarch64 build workspkgs.which
: probably was unused before, there were no references to itNIX_CFLAGS_COMPILE = "-DNODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT";
: builds without this with node 20Issues I encountered and solved
Error: cannot find '/build/source/node_modules/.pnpm/[email protected]/node_modules/sqlite3/build/Release/node_sqlite3.node
pnpm.configHook
callspnpm install
with--ignore-scripts
that skips downloading/building node-sqlite3 bindings. A solution is building it manually: (usenode-gyp
from nixpkgs rather than from pnpm installed node_modules to avoid other errors)nixpkgs/pkgs/by-name/n8/n8n/package.nix
Lines 65 to 67 in 077adff
turbo run build: Failed to create APIClient: Unable to set up TLS. builder error: No such file or directory
In turbo release 1.12.4, they switched to using
rustls-tls-native-roots
rust crate which tries to open a file fromSSL_CERT_FILE
environment variable, which is set to/no-cert-file.crt
in a nix build environment. Addingcacert
to build inputs will set this env var to a real file, fixing the issue.ERR_PNPM_BAD_PM_VERSION This project is configured to use v9.1.4 of pnpm. Your current pnpm is v9.1.1.
Patching
package.json
to replace pnpm version to the current fixes it:nixpkgs/pkgs/by-name/n8/n8n/package.nix
Line 35 in 077adff
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.