Hi. I'm trying to deploy a simple upgradeable contract. I'm following the documentation at https://docs.openzeppelin.com/defender/v2/tutorial/deploy using hardhat
Since Hardhat now uses ignition, is not creating the scripts folder as the documentation says, So I have create the folder and the deploy.ts file manually
this is what I get:
`npx hardhat run --network sepolia scripts/deploy.ts
Error: Cannot find module '/Users//git//defender_test/node_modules/@openzeppelin /defender-sdk-base-client/lib/index.js'. Please verify that the package.json has a valid "main" entry`
any idea?
Environment
Hardhat with TS
2 Likes
The same error is getting stuck when deploying the Foundry project.
nijoe1
May 28, 2024, 12:30pm
3
I am also getting the same error from yesterday. 3 Days ago that wasn't a problem
Please anyone to help on that !
1 Like
nijoe1
May 28, 2024, 12:37pm
4
Those folders are doing the damage. Inside @openzeppelin package
I copied them from a previous project and now it works.
1 Like
This is killing me
Where can I copy the working packages?
nijoe1
May 28, 2024, 12:50pm
6
Is a zip file containing those packages. Hope this helps
https://gateway.lighthouse.storage/ipfs/Qmcypai73QRCcbssJVBpZHcvFnPwywkNucxd3QH2pA44Wq
And also hope this will get resolved soon
4 Likes
Thanks!, this worked for me too. Let's hope for an official update.
Thanks a lot! It helped me too
are you guys getting your deployed contracts verified? In my tests they are not being verified automatically
Immi
May 28, 2024, 9:55pm
11
Hey, I'm also having the same issue I believe with:
@openzeppelin/defender-sdk-monitor-client/package.json
Would appreciate if someone could share their version of this folder (defender-sdk-monitor-client ) if they have it!
This issue is fixed in https://github.com/OpenZeppelin/defender-sdk/issues/367 .
You can get the fix by installing the latest versions of the Defender SDK packages, for example:
npm install @openzeppelin/defender-sdk-base-client@latest
npm install @openzeppelin/defender-sdk-deploy-client@latest
npm install @openzeppelin/defender-sdk-network-client@latest
1 Like