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') );