diff --git a/libs/remixd/src/services/hardhatClient.ts b/libs/remixd/src/services/hardhatClient.ts index 63749d3be3..3928e9af64 100644 --- a/libs/remixd/src/services/hardhatClient.ts +++ b/libs/remixd/src/services/hardhatClient.ts @@ -54,7 +54,7 @@ export class HardhatClient extends PluginClient { const errMsg = '[Hardhat Compilation]: Cannot compile in read-only mode' return reject(new Error(errMsg)) } - const cmd = utils.normalizePath(`./node_modules/.bin/hardhat compile --config ${utils.normalizePath(configPath)}`) + const cmd = `npx hardhat compile --config ${utils.normalizePath(configPath)}` const options = { cwd: this.currentSharedFolder, shell: true } const child = spawn(cmd, options) let result = ''