Skip to main content
If you’re using Vite.js with react and using the Dynamic SDK with Starknet, you may get a similar error to this one in your console:
This is because older versions of Vite don’t know how to resolve the starknet module exports.

Add resolve alias for starknet using vite.config.js

To fix this we must modify the vite.config.js file to add an alias for starknet. Here is a minimal example config:
Last modified on January 26, 2026