Error: spawn npx ENOENT

Hi,

this is my code snippet :
const childProcess = spawn(‘npx’, [
‘hardhat’,
‘run’,
‘deploy.js’,
‘–network’,
‘polygonMumbai’
], {
cwd: deployScriptPath,
env: {
HARDHAT_CONFIG_PATH: hardhatConfigPath,
// Pass variables as environment variables
CONTRACT_NAME: req.body.contractName,
CONTRACT_SYMBOL: req.body.contractSymbol,
TOKEN_TRANSFER_ADDRESS: req.body.tokenTransferAddress,
TOTAL_SUPPLY: req.body.totalSupply,
USER_ADDRESS: req.body.userAddress,
GET_LAST_PAYMENT_RECORD_INDEX: req.body.getLastPaymentRecordIndex
},
});

Pls help me to solve the issue.

Hi,

I’ve replied to the ticket you also opened. Let’s keep the conversation in one place (on the ticket). Then, you can update this post when we get to the solution.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.