Fix module resolution when $CWD != .

This commit is contained in:
Emma [it/its]@Rory&
2024-10-25 18:57:29 +02:00
committed by Rory&
parent 168758924c
commit 2feb90475e
8 changed files with 22 additions and 4 deletions

12
scripts/test-non-cwd-exec.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env nix-shell
#!nix-shell -i "bash -x" -p bash jq git nodejs
npm i
npm run setup || exit 1
export OWD="$PWD"
export NWD="`mktemp -d`"
echo "Src dir: $OWD"
echo "Exec dir: $NWD"
#NODE_PATH="$OWD/dist"
node "$OWD/dist/api/start.js"