use-shopping-cart: Typescript issues and validateCart not being exported

I am using version 3.03 Type Issue: Module ‘“use-shopping-cart”’ has no exported member ‘CartProvider’.

validateCart is not exported

Module not found: Package path ./utilities/serverless is not exported from package\node_modules\use-shopping-cart (see exports field in\node_modules\use-shopping-cart\package.json)
> 11 | import { validateCartItems } from "use-shopping-cart/utilities/serverless";

I have also tried ‘use-shopping-cart/src/serverUtil’ however that doesn’t exist.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@pntpbgn and @bryandandan, if you haven’t seen it yet, there is a TypeScript example in the examples directory. In the serverless function, we use the following import statement successfully:

import { validateCartItems } from 'use-shopping-cart/utilities'

I hope that helps! And happy holidays

I still have the same issue v.3.1.2

@dayhaysoos I didn’t find any other issue yet, so I think, it is ok, thank you for your response, keep up good work.