Amity-Social-Cloud-Web-Sample-Apps Getting error Module not found: Error: Can't resolve '@amityco/ui-kit-open-source'

I’m following this document for setup UIkit in my document “https://docs.amity.co/uikit/web/web-javascript-migration-guide” but getting this error
Module not found: Error: Can’t resolve ‘@amityco/ui-kit-open-source’ in ‘D:\Agile_Office_Work\Amity-Social-Cloud-Web-Sample-Apps\chat-simple-amity-m2\src’

Can anyone help me for this error?

Hello, from the document, may we confirm, which method did you follow, 1 or 2 ? And what’s your current sdk version?

I try both method but getting same error

Could you please try following the steps in this github: GitHub - AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource: Amity Social Cloud offers Chat and Social SDKs to streamline app development. Dive into our UI Kits and sample apps in our repositories to spark your creativity. To learn more, visit amity.co.

TypeError: Cannot read properties of null (reading ‘useState’)

useState

Amity-Social-Cloud-UIKit-Web-OpenSource/node_modules/react/cjs/react.development.js:1433

Hello @praveen.kumar it seems that the issue might be related to ‘useState’ within React, not the UIKit issue. We recommend conducting some research into the ‘useState’ implementation on your end to pinpoint the cause of the problem.

@amitysupport But I’m not using useState. I created new simple project using “$ npx create-react-app my-react-app”
and run project simple page worked but after the link, I got this error.

Please link the UIKit open source with these following steps to prevent encounter issues

Here are the steps to install ui-kit together with another project.

  1. git clone git@github.com:AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource.git
  2. cd ./Amity-Social-Cloud-UIKit-Web-OpenSource
  3. npm ci
  4. npm link
  5. npm link ./<path-to-your-app>/node_modules/react ./<path-to-your-app>/node_modules/react-dom
  6. npm run build
  7. cd ./<path-to-your-app>
  8. npm link @amityco/ui-kit-open-source --save

** We need to link react module to react module in destination project so that react is the same instance otherwise we will encounter issues with react hook.