You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone the base repository (FastStore starter).
Run the yarn build command.
The build process fails with the above error.
Expected Behavior: The build process should complete successfully without errors.
Current Behavior: A type error occurs in ProductGallery.tsx.
Possible Causes:
The issue seems related to the context type (usePage()) returned to the component.
Specifically, the context type in usePage might be missing or inferred as never due to unclear definitions or conflicting types in the project.
Attempts to Solve:
Temporarily setting the type to any resolves the issue but is not an ideal solution.
Reviewed the PageProvider and type guard functions like isPLP, isPDP, and isSearchPage.
Additional Information:
The issue appears to stem from type definitions in the PageProvider and ProductGallery files.
Please let me know if further details or testing are needed. Thank you!
The text was updated successfully, but these errors were encountered:
Problem Description:
When running the build command using yarn build (which executes faststore build), the following type error occurs:
./src/components/sections/ProductGallery/ProductGallery.tsx:42:17
Type error: Property 'data' does not exist on type 'never'.
40 | ? [context?.data?.title, context?.data?.searchTerm]
41 | : isPLP(context)
Steps to Reproduce the Issue:
Clone the base repository (FastStore starter).
Run the yarn build command.
The build process fails with the above error.
Expected Behavior: The build process should complete successfully without errors.
Current Behavior: A type error occurs in ProductGallery.tsx.
Possible Causes:
The issue seems related to the context type (usePage()) returned to the component.
Specifically, the context type in usePage might be missing or inferred as never due to unclear definitions or conflicting types in the project.
Attempts to Solve:
Temporarily setting the type to any resolves the issue but is not an ideal solution.
Reviewed the PageProvider and type guard functions like isPLP, isPDP, and isSearchPage.
Additional Information:
The issue appears to stem from type definitions in the PageProvider and ProductGallery files.
Please let me know if further details or testing are needed. Thank you!
The text was updated successfully, but these errors were encountered: