I was deploying Strapi to AWS and when I write the command to build npm it shows an error of cannot find module : metadata.js

Even if metadata is installed, it is showing the same error of cannot find module:metadata.js

can you show the error?

This is the error

Would suggest delete, cache build folder and npm install again :slight_smile:
See if that changes anything :slight_smile:

I have tried everything possible from my side, but it is same as before.

Can you try updating to the newest strapi version

I have updated Strapi to it’s latest version, but the error is same as before.

If you have any other way to update Strapi, other than the Strapi documentation then please provide it.

Did you rebuild the admin after updating?

Yes, I did.

Maybe step the people through how you deploy your project.
If this is EC2 instance etc, did you install build tools and other dependencies ?
Also maybe mention nodeJS version, strapi version, yarn / and or npm version too.