What you’re experiencing has to do with how TypeScript types are generated from react VTEX IO apps. Since you have vtex.order-placed listed in your package.json, you’re correctly using the types that were automatically generated by VTEX IO for vtex.order-placed. But if you take a look at these types (you can find them inside your project’s node_modules folder), you’ll notice that there’s a single entrypoint, in the form of index.d.ts. This single entrypoint then exports all of the modules that you can import from vtex.order-placed. Sooo, instead of having multiple entrypoints, that would enable you to import modules like this: import {...} from 'vtex.order-placed/ModuleName', you always have to import modules like this: import { ModuleName } from 'vtex.order-placed' so that TypeScript doesn’t complain.
For the hooks you’re trying to use, you have to import them like this:
I know that this is a bit confusing, but this is due to the fact that the tooling we use to generate TypeScript types automatically doesn’t support multiple entrypoints, the same way that VTEX IO supports internally. This issue you’re having is strictly related to TypeScript, there’s nothing wrong with your code .