(Solved) Lesson 5: ReferenceError: ProcessingInstruction is not defined #389
-
Hey I am in lesson 5 and I have successfully "console.logged" my smart contract as well as my deployment receipt, with a proper output coming out for both these things. However, right after it is logged there is an error which says "ReferenceError: ProcessingInstruction is not defined". It's not really affecting the output because my ganache is connected (thanks in large to the chronological updates), but this error is bugging me. The following is my deploy.js code: const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
//... other code
const contractFactory = new ethers.ContractFactory(abi, binary, wallet);
console.log("Deploying, please wait...");
const contract = await contractFactory.deploy();
const deploymentReceipt = await contract.deployTransaction.wait(1);
console.log(deploymentReceipt);
}
main()
.then(() => ProcessingInstruction.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
This is towards the end of the output for this code:
.then(() => ProcessingInstruction.exit(0)) process, instead of ProcessingInstruction, no clue where I got that from |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
it is process.exit(0); not this main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
}); |
Beta Was this translation helpful? Give feedback.
@rayb0y
it is process.exit(0); not this
ProcessingInstruction.exit(0)