Fix module resolution when $CWD != .
This commit is contained in:
parent
168758924c
commit
2feb90475e
BIN
flake.lock
generated
BIN
flake.lock
generated
Binary file not shown.
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
@ -46,6 +46,7 @@
|
|||||||
"@types/i18next-node-fs-backend": "^2.1.2",
|
"@types/i18next-node-fs-backend": "^2.1.2",
|
||||||
"@types/json-bigint": "^1.0.1",
|
"@types/json-bigint": "^1.0.1",
|
||||||
"@types/jsonwebtoken": "^9.0.2",
|
"@types/jsonwebtoken": "^9.0.2",
|
||||||
|
"@types/module-alias": "^2.0.4",
|
||||||
"@types/morgan": "^1.9.4",
|
"@types/morgan": "^1.9.4",
|
||||||
"@types/multer": "^1.4.7",
|
"@types/multer": "^1.4.7",
|
||||||
"@types/murmurhash-js": "^1.0.4",
|
"@types/murmurhash-js": "^1.0.4",
|
||||||
|
|||||||
12
scripts/test-non-cwd-exec.sh
Executable file
12
scripts/test-non-cwd-exec.sh
Executable 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"
|
||||||
@ -16,7 +16,8 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("module-alias/register");
|
import moduleAlias from "module-alias";
|
||||||
|
moduleAlias(__dirname + "../../../package.json");
|
||||||
process.on("uncaughtException", console.error);
|
process.on("uncaughtException", console.error);
|
||||||
process.on("unhandledRejection", console.error);
|
process.on("unhandledRejection", console.error);
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// process.env.MONGOMS_DEBUG = "true";
|
// process.env.MONGOMS_DEBUG = "true";
|
||||||
require("module-alias/register");
|
import moduleAlias from "module-alias";
|
||||||
|
moduleAlias(__dirname + "../../../package.json");
|
||||||
|
|
||||||
import "reflect-metadata";
|
import "reflect-metadata";
|
||||||
import cluster, { Worker } from "cluster";
|
import cluster, { Worker } from "cluster";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
|
|||||||
@ -16,7 +16,8 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("module-alias/register");
|
import moduleAlias from "module-alias";
|
||||||
|
moduleAlias(__dirname + "../../../package.json");
|
||||||
import "dotenv/config";
|
import "dotenv/config";
|
||||||
|
|
||||||
import { CDNServer } from "./Server";
|
import { CDNServer } from "./Server";
|
||||||
|
|||||||
@ -16,7 +16,8 @@
|
|||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("module-alias/register");
|
import moduleAlias from "module-alias";
|
||||||
|
moduleAlias(__dirname + "../../../package.json");
|
||||||
process.on("uncaughtException", console.error);
|
process.on("uncaughtException", console.error);
|
||||||
process.on("unhandledRejection", console.error);
|
process.on("unhandledRejection", console.error);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user