RocketChat / EmbeddedChat

An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
https://rocketchat.github.io/EmbeddedChat/docs
112 stars 222 forks source link

Cant unable to setup locally #299

Open Chocola04 opened 9 months ago

Chocola04 commented 9 months ago

Description:

I have done all the steps as mentioned in the getting started guide till spinning up the story book server but it is showing an error as [!] Error: Could not resolve './EmbeddedChatApi.ts' from ../api/dist/index.mjs

The File './EmbeddedChatApi.ts' doesn't even exist in the particular directory

Steps to reproduce:

  1. Use 16.19.0 node version.
  2. Now run yarn in the root folder.
  3. Now change your directory to packages\react.
  4. Run yarn storybook.

Expected behavior:

The components should be displayed without any error

Actual behavior:

image

abhinavkrin commented 9 months ago

Hey @Chocola04 The build process might not have executed successfully. You can try manually building the api package. Go to packages/api and run yarn build

Chocola04 commented 9 months ago

@abhinavkrin I have run yarn build still facing the same issue. Please help me

harisudarsan1 commented 9 months ago

Hey @abhinavkrin do we need to run the rocket.Chat server just to view storybook components

ameeetgaikwad commented 7 months ago

@abhinavkrin I'm facing a issue while setting up local environment.

image

Not able to type or send messages. When I click join, it asks me for email and password. When I enter email and password nothing happens.

Spiral-Memory commented 7 months ago

Hey @Chocola04 @harisudarsan1 , In packages/auth and in packages/api, look for rollup.config.js, replace the external parameter in both config files in the bundle function to:

id => {
    return id[0] !== '.' && !path.isAbsolute(id);
  },
})

from

id => !/^[./]/.test(id),

Make sure to import path module in both config files using:

import path from 'path';

After doing these changes, run your build again, it will work:

Refer to this PR for video instruction to build it on windows: https://github.com/RocketChat/EmbeddedChat/pull/406

Spiral-Memory commented 7 months ago

@ameeetgaikwad , Check if your local instance of rocket chat server has 2FA disabled. There is a bug that login doesn't work as expected when 2FA is enabled. I have raised a issue and PR for the same, you can refer to it: https://github.com/RocketChat/EmbeddedChat/issues/400