Cannot find module @openzeppelin/defender-sdk-base-client/lib/index.js

Hi. I'm trying to deploy a simple upgradeable contract. I'm following the documentation at 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?

:computer: Environment

Hardhat with TS


The same error is getting stuck when deploying the Foundry project.

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

Screenshot from 2024-05-28 15-35-46

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?

Is a zip file containing those packages. Hope this helps

And also hope this will get resolved soon


Appreciate it, it works

1 Like

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

Hey, I'm also having the same issue I believe with:


Would appreciate if someone could share their version of this folder (defender-sdk-monitor-client) if they have it!

Hi everyone, this issue is tracked in and we are working on a fix. For now you can use the workaround provided in