@voxket-ai/voxket-live 1.0.46 → 1.0.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,82 @@
1
+ # Consumer App Setup Guide
2
+
3
+ If you're experiencing the "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')" error, follow these steps:
4
+
5
+ ## Step 1: Ensure React Version Compatibility
6
+
7
+ Make sure your consumer app uses React 18.3.x or compatible:
8
+
9
+ ```json
10
+ {
11
+ "dependencies": {
12
+ "react": "^18.3.1",
13
+ "react-dom": "^18.3.1"
14
+ }
15
+ }
16
+ ```
17
+
18
+ ## Step 2: Clean Install
19
+
20
+ ```bash
21
+ rm -rf node_modules package-lock.json
22
+ npm install
23
+ ```
24
+
25
+ ## Step 3: Next.js Configuration (if using Next.js)
26
+
27
+ Add this to your `next.config.js`:
28
+
29
+ ```javascript
30
+ /** @type {import('next').NextConfig} */
31
+ const nextConfig = {
32
+ experimental: {
33
+ esmExternals: false
34
+ },
35
+ webpack: (config, { isServer }) => {
36
+ if (!isServer) {
37
+ config.resolve.fallback = {
38
+ ...config.resolve.fallback,
39
+ fs: false,
40
+ net: false,
41
+ tls: false,
42
+ };
43
+ }
44
+
45
+ // Ensure React is resolved to the same instance
46
+ config.resolve.alias = {
47
+ ...config.resolve.alias,
48
+ 'react': require.resolve('react'),
49
+ 'react-dom': require.resolve('react-dom'),
50
+ };
51
+
52
+ return config;
53
+ },
54
+ };
55
+
56
+ module.exports = nextConfig;
57
+ ```
58
+
59
+ ## Step 4: Usage
60
+
61
+ ```tsx
62
+ 'use client'; // For Next.js app router
63
+
64
+ import React from 'react';
65
+ import { VoxketClient } from '@voxket-ai/voxket-live';
66
+
67
+ function MyComponent() {
68
+ return (
69
+ <VoxketClient
70
+ config={{
71
+ // your config
72
+ }}
73
+ />
74
+ );
75
+ }
76
+ ```
77
+
78
+ ## Troubleshooting
79
+
80
+ 1. **Clear cache**: `rm -rf .next` (for Next.js) or equivalent for your bundler
81
+ 2. **Check React versions**: Ensure all React-related packages use the same version
82
+ 3. **Bundle analyzer**: Use webpack-bundle-analyzer to check for duplicate React instances
package/README.md CHANGED
@@ -22,11 +22,13 @@ or
22
22
  yarn add @voxket-ai/voxket-live
23
23
  ```
24
24
 
25
- The package is currently published at version `1.0.13`. For the latest version, you can use:
25
+ The package is currently published at version `1.0.49`. For the latest version, you can use:
26
26
  ```bash
27
27
  npm install @voxket-ai/voxket-live@latest
28
28
  ```
29
29
 
30
+ ⚠️ **Troubleshooting**: If you encounter React-related errors, please see [CONSUMER_SETUP.md](./CONSUMER_SETUP.md) for detailed setup instructions.
31
+
30
32
  ## Usage
31
33
 
32
34
  To use the Voxket Live widget in your React application, simply import and use the component. **No separate CSS import is required** - styles are automatically included: