What's the error? What do u mean by not work on vs code? Type npx hardhat node for running local hardhat network.. Check node -v