cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Module not found, is not exported from 'spartacus/order'

manuel2485
Discoverer
0 Kudos
978

We are working on updating our Spartacus environment to Composable Storefront 5.2.2, but an error is occurring when extending from the OrderConfirmationTotalsComponent and OrderConfirmationItemsComponent classes:

Error: Module not found: Error: Package path ./components/order-confirmation/order-confirmation-totals/order-confirmation-totals.component is not exported from package ...\node_modules\@spartacus\order (see exports field in ...\node_modules\@spartacus\order\package.json)

So, the path '@spartacus/order/components' doesn't work either.

Is there any patch or alternative solution available?

View Entire Topic
samuelyang
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi manuel2485

In version 5.2, the OrderConfirmationTotalsComponent and OrderConfirmationItemsComponent component classes are moved from the 4.3 checkout library to the new order library, so the 5.2 import should look like this:

import {OrderConfirmationTotalsComponent, OrderConfirmationItemsComponent} from '@spartacus/order/components'

After the import, you can extends the standard component classes from your own components.

And are you using the Spartacus schematics tool to upgrade your existing codes to 5.2.2, e.g., ng update @spartacus/schematics@5.2.2 ? Or are you just manually updating the old codes?

Thanks & Regards,

Samuel