# React Accelerator cannot create cart object

**URL:** <https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [October 5, 2023, 1:13pm UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082 "2023-10-05T13:13:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnu\_kj](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/vishnu_kj/32/685_2.png) [@vishnu\_kj](https://forum.litium.com/u/vishnu_kj)\
**Post date:** [October 5, 2023, 1:13pm UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/1 "2023-10-05T13:13:17Z")

</div>

Hi,

I have been playing a while with setting up the React accelerator project with storefront api as per the documentation.

We have getting the following error while

[GraphQL error for url [https://litium-storefront.localtest.me/storefront.graphql](https://litium-storefront.localtest.me/storefront.graphql)]: Message: Cannot create cart., Location: [{“line”:2,“column”:3}], Path: [“createCart”], Data: {“headers”:{“cookie”:null,“x-litium-storefront-context-url”:“[https://localhost:3001/](https://localhost:3001/)”}}

I could see that \_requestModelAccessor.RequestModel is null while creating the cart.

How to have the RequestModel has value in it?

Litium version: _[8.12.0]_

---

<div class="post-metadata">

**Author:** ![ton.nguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ton.nguyen/32/989_2.png) [@ton.nguyen](https://forum.litium.com/u/ton.nguyen)\
**Post date:** [October 10, 2023, 2:32pm UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/2 "2023-10-10T14:32:05Z")

</div>

Hi,

Please check the Litium log to see the actual error that caused the problem. Also make sure the domain you are using for the React accelerator is added to website’s channel, as mentioned in the **Configure Litium for an external storefront** section of the document: [https://docs.litium.com/accelerators/react-accelerator/get-started](https://docs.litium.com/accelerators/react-accelerator/get-started)

---

<div class="post-metadata">

**Author:** ![vishnu\_kj](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/vishnu_kj/32/685_2.png) [@vishnu\_kj](https://forum.litium.com/u/vishnu_kj)\
**Post date:** [October 11, 2023, 7:47am UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/3 "2023-10-11T07:47:35Z")

</div>

Have fixed that. But while moving forward while browsing localhost:3001 i get this error

graphQLErrors [  
{  
message: ‘The field productFilterFields does not exist on the type AcceleratorWebsiteWebsiteFieldContainer.’,  
locations: [[Object] ],  
path: [‘channel’, ‘website’, ‘fields’],  
extensions: {  
type: ‘AcceleratorWebsiteWebsiteFieldContainer’,  
field: ‘productFilterFields’,  
responseName: ‘productFilterFields’,  
specifiedBy: ‘[GraphQL](http://spec.graphql.org/October2021/#sec-Field-Selections-on-Objects-Interfaces-and-Unions-Types)’  
}  
}  
]  
[GraphQL error for url [https://litiumstorefront.localtest.me/storefront.graphql](https://litiumstorefront.localtest.me/storefront.graphql)]: Message: The field productFilterFields does not exist on the type AcceleratorWebsiteWebsiteFieldContainer., Location: [{“line”:102,“column”:9}], Path: [“channel”,“website”,“fields”], Data: {“headers”:{“cookie”:“cart-context=CfDJ8Jo1vhEpMOhCrqp16\_aG9WhZ2Edt9Dv-ha4m2Hi\_LYFGkhbVvJ7JhKmoZTrrPGWslGU9A-JINN4dXIiPybTDKiM0xUQh\_NOcf8cpIwdTtb494azQpkt2Nsi5pv7O9tzgZ-QgIxCFfEZ9CgoVMSgPS6A; idsrv.session=A02B48F906CFC96CB84FB2FB77AF2663; .AspNetCore.Identity.Application=CfDJ8G93f-ZpZr1Fua6qCD8DbISTHor-CCnNF5X8a\_No5DLGuViBhtMQZO70qso1WVmEMlNaHXzu8fwgTuAW25KWSGONHu6jk0Uv141MhvGxxVwBTVoKTFljLbOw\_jW2sK5IHIJCZ4GMvnsSZwmzdh0D5ua\_NDPpvplPBzUgM-3gchcKIi2efdBP1MtNAX5gxYVUEVL3xHnHF\_4j7-KlIPczfF1IDOl1vTZCY3z1B6G4aZOTACLH-hCaXe72cQ19jaA6vNb5d7\_v7qS9p4wpVksseDHe\_\_dfnXErpwRKjIg5Do84jwO3El\_2JNXHYnk3kprueIJyKCHi9ysp\_-hvvAcWtN8Yw0j0L2XKNH4PGhVf-fcqnjTZSW-Z\_N2MZeC21CY1XkduT4Qy\_KZhT2U4RdH1B0xr034A4jiT7lzU44qMXVhZBEBysPxhVipmoMhIEYTurK8rrqMYfmezlEQ9GhhtWdWP7PdOTa7PaQwVY0IyCwdIFRFA9juNFLQ0QdQtMcbUMk3Dke9C2eDYzULVrZClpBU8MTj1XMMsNVcYIqAQ4WWQToFr7yxv1BIQsbyKA8Pr9\_vOAeZur0y7l4nZ-OOxBRBaox-uREVH3BuYhudZZ5RxpK5UHXnBPUwMcmwUarJFsKFQwq0iRCc9dFZXVN2qNPMXQymDD2I8lcGh4AMyYmgh008a3n9zKRrpbhmF5BVfRa6XBCVRKZJVpvO3Gm-YFesg\_cy1Z65yciabMxQauENCZXXg190SwgRpU2ulJpQTP85LTin8pNjPFtEuGr12sve3zaylKvhMsUCh7GYFV1kHY9mJSJyIDQkjsrAFWKsR5qxAEgWSvQSCLiiY3dohfNNUs3XqeJCkukrd\_MI\_u0\_HX668UwpTrTanHIaAJJZuGWGIuTeOLiFKP\_Ol2Xcl\_p5k2GaF2sdXq26kaGd2psm5EDt63AxFHa\_Ag\_KN1yW0k5G2h\_HOOmqdglPiun5iucPhdjNgenOB3QrYlwIF7P0eoJ\_hWTJjAQwzkd9UIBuNPOqJcElxhQODTmm7TKSOnHxt3Q5t7VOHIDlR1FkvyjpFdYN2imHYvLZq4YJquKATQlRUjybdmaJ3HSmSiVSFMMRC2DSUdT2UlSRWXgRcwVGpicQ2DMaIi-Lnyu5x-XxxtUkjZne9SfQalDg803G9nKVBnH42DwEICHciC02UgDcxRq8UQpA1Xa12F16SCGabAbo4RqIjPTbMhc5nNEBjae0”,“x-litium-storefront-context-url”:“[https://localhost:3001/](https://localhost:3001/)”}}  
[GraphQL Network error for url [https://litiumstorefront.localtest.me/storefront.graphql](https://litiumstorefront.localtest.me/storefront.graphql)]: ServerError: Response not successful: Received status code 400  
Stack: ServerError: Response not successful: Received status code 400  
at Object.throwServerError (webpack-internal:///(rsc)/./node\_modules/@apollo/client/link/utils/utils.cjs:39:17)  
at parseJsonBody (webpack-internal:///(rsc)/./node\_modules/@apollo/client/link/http/http.cjs:285:15)  
at eval (webpack-internal:///(rsc)/./node\_modules/@apollo/client/link/http/http.cjs:307:20)  
at process.processTicksAndRejections (node:internal/process/task\_queues:95:5)  
⨯ node\_modules@apollo\client\errors\errors.cjs (33:27) @ call  
⨯ ApolloError: Response not successful: Received status code 400  
at new Promise ()  
at Array.forEach ()  
null  
⨯ node\_modules@apollo\client\errors\errors.cjs (33:27) @ call  
⨯ ApolloError: Response not successful: Received status code 400  
at new Promise ()  
at Array.forEach ()  
digest: “3489163256”  
null

---

<div class="post-metadata">

**Author:** ![MichaelNattfalk](https://avatars.discourse-cdn.com/v4/letter/m/9de053/32.png) [@MichaelNattfalk](https://forum.litium.com/u/MichaelNattfalk)\
**Post date:** [October 11, 2023, 8:10am UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/4 "2023-10-11T08:10:02Z")

</div>

Hi.  
From the exception message it looks as if you are missing some of the field/block definitions.  
Use the storefront cli tool and import the definitions from the frontend project (included in the folder litium-defintions).  
Follow the guide under section “Import definitions” at [Storefront CLI](https://docs.litium.com/accelerators/react-accelerator/storefront-cli).

---

<div class="post-metadata">

**Author:** ![vishnu\_kj](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/vishnu_kj/32/685_2.png) [@vishnu\_kj](https://forum.litium.com/u/vishnu_kj)\
**Post date:** [October 11, 2023, 9:50am UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/5 "2023-10-11T09:50:04Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/a53a1617bc8e8bb72bc8271e00fc29f1a7dda323.png)  
when running the import we get this error (Litium Version 8.12.0)

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [October 11, 2023, 1:33pm UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/6 "2023-10-11T13:33:16Z")

</div>

Not sure what version of the storefront cli that you using, the 1.0.0-rc-01 require Litium 8.13.0 due to the removal of display templates.

This error that you are getting may be related to that, maybe you can find more details in the log for the Litium platform.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 8, 2023, 1:33pm UTC](https://forum.litium.com/t/react-accelerator-cannot-create-cart-object/3082/7 "2023-11-08T13:33:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
