microsoft / Msdyn365.Commerce.Online

Dynamics 365 Commerce online project
Other
49 stars 41 forks source link

Error while build using CI pipeline on Azure Devops #45

Closed AmanSonii closed 1 year ago

AmanSonii commented 2 years ago

The build gets completed locally and the pack gets created successfully. However, once I merged the code on DevOps I got the following errors.

Error 1: D:/a/1/s/submission/src/themes/themename/views/components/cartlineitem.component.tsx ERROR in D:/a/1/s/submission/src/themes/themename/views/components/cartlineitem.component.tsx(635,22): TS2786: 'Image' cannot be used as a JSX component. Its instance type 'Image' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("D:/a/1/s/submission/node_modules/@types/enzyme/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'. Type '{}' is missing the following properties from type 'ReactPortal': key, children, type, props

Error 2: D:/a/1/s/submission/src/themes/themename/views/navigation-menu.view.tsx ERROR in D:/a/1/s/submission/src/themes/themename/views/navigation-menu.view.tsx(607,18): TS2786: 'Image' cannot be used as a JSX component. Its instance type 'Image' is not a valid JSX element. Errors during webpack build. See previous several lines for additional messages (written as 'stats-client-build-errors.json'). error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -- Error building application. -- undefined error Command failed with exit code 1.

Looking forward for any solution on the same.

Thanks, Aman

AmanSonii commented 1 year ago

This issue was resolved by updating the react version.

AmanSonii commented 1 year ago

This issue was resolved by updating the react version.

AmanSonii commented 1 year ago

This issue was resolved by updating the react version.