From 9b152f4d5a05f1ee613a94665fddeb92880507b4 Mon Sep 17 00:00:00 2001 From: Jordan Last Date: Thu, 29 Aug 2024 18:34:28 -0500 Subject: [PATCH] get the wasmedge_quickjs directory in a universal way --- src/build/experimental/utils/global_paths.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/build/experimental/utils/global_paths.ts b/src/build/experimental/utils/global_paths.ts index bc2183e577..014169b4fb 100644 --- a/src/build/experimental/utils/global_paths.ts +++ b/src/build/experimental/utils/global_paths.ts @@ -1,4 +1,5 @@ -import { join } from 'path'; +import { createRequire } from 'module'; +import { dirname, join } from 'path'; import { AZLE_PACKAGE_PATH } from '../../stable/utils/global_paths'; @@ -8,8 +9,6 @@ export const EXPERIMENTAL_CANISTER_TEMPLATE_PATH = join( 'experimental.wasm' ); -export const WASMEDGE_QUICKJS_PATH = join( - AZLE_PACKAGE_PATH, - 'node_modules', - 'wasmedge_quickjs' +export const WASMEDGE_QUICKJS_PATH = dirname( + createRequire(import.meta.url).resolve('wasmedge_quickjs/package.json') );