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
TypeError: Cannot read properties of null (reading ‘useState’)
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.
- git clone email@example.com:AmityCo/Amity-Social-Cloud-UIKit-Web-OpenSource.git
- cd ./Amity-Social-Cloud-UIKit-Web-OpenSource
- npm ci
- npm link
- npm link ./
- npm run build
- cd ./
- 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.