@centive/aria-sdk 0.6.6 → 0.6.7

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.
package/README.md CHANGED
@@ -311,6 +311,122 @@ Requires WebRTC support for video streaming.
311
311
 
312
312
  ## Troubleshooting
313
313
 
314
+ ### "The requested module 'buffer' does not provide an export named 'Buffer'"
315
+
316
+ This error occurs because `@anam-ai/js-sdk` uses Node.js's `Buffer` which isn't available in browser environments by default.
317
+
318
+ **Fix for Vite users:**
319
+
320
+ 1. Install the buffer polyfill:
321
+
322
+ ```bash
323
+ npm install buffer
324
+ ```
325
+
326
+ 2. Create or update your `vite.config.ts`:
327
+
328
+ ```typescript
329
+ import { defineConfig } from 'vite'
330
+ import react from '@vitejs/plugin-react'
331
+
332
+ export default defineConfig({
333
+ plugins: [react()],
334
+ define: {
335
+ global: 'globalThis',
336
+ },
337
+ resolve: {
338
+ alias: {
339
+ buffer: 'buffer/',
340
+ },
341
+ },
342
+ optimizeDeps: {
343
+ include: ['buffer'],
344
+ esbuildOptions: {
345
+ define: {
346
+ global: 'globalThis',
347
+ },
348
+ },
349
+ },
350
+ })
351
+ ```
352
+
353
+ 3. Add the Buffer polyfill to your app's entry point (e.g., `main.tsx` or `index.tsx`):
354
+
355
+ ```typescript
356
+ // Add this at the very top of your entry file, before any other imports
357
+ import { Buffer } from 'buffer';
358
+ globalThis.Buffer = Buffer;
359
+
360
+ // Then your other imports
361
+ import React from 'react';
362
+ import ReactDOM from 'react-dom/client';
363
+ // ...
364
+ ```
365
+
366
+ **Fix for Webpack users:**
367
+
368
+ 1. Install the buffer polyfill:
369
+
370
+ ```bash
371
+ npm install buffer
372
+ ```
373
+
374
+ 2. Add to your `webpack.config.js`:
375
+
376
+ ```javascript
377
+ const webpack = require('webpack');
378
+
379
+ module.exports = {
380
+ // ... other config
381
+ resolve: {
382
+ fallback: {
383
+ buffer: require.resolve('buffer/'),
384
+ },
385
+ },
386
+ plugins: [
387
+ new webpack.ProvidePlugin({
388
+ Buffer: ['buffer', 'Buffer'],
389
+ }),
390
+ ],
391
+ };
392
+ ```
393
+
394
+ **Fix for Next.js users:**
395
+
396
+ 1. Install the buffer polyfill:
397
+
398
+ ```bash
399
+ npm install buffer
400
+ ```
401
+
402
+ 2. Update your `next.config.js`:
403
+
404
+ ```javascript
405
+ /** @type {import('next').NextConfig} */
406
+ const nextConfig = {
407
+ webpack: (config) => {
408
+ config.resolve.fallback = {
409
+ ...config.resolve.fallback,
410
+ buffer: require.resolve('buffer/'),
411
+ };
412
+ return config;
413
+ },
414
+ };
415
+
416
+ module.exports = nextConfig;
417
+ ```
418
+
419
+ 3. Add to your `_app.tsx` or root layout:
420
+
421
+ ```typescript
422
+ import { Buffer } from 'buffer';
423
+ if (typeof window !== 'undefined') {
424
+ globalThis.Buffer = Buffer;
425
+ }
426
+ ```
427
+
428
+ ---
429
+
314
430
  ### "WebSocket connection failed"
315
431
 
316
432
  - Check that your backend WebSocket server is running
@@ -1 +1 @@
1
- {"version":3,"file":"AriaStandaloneUI.d.ts","sourceRoot":"","sources":["../../src/components/AriaStandaloneUI.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAQV,KAAK,EACN,MAAM,SAAS,CAAC;AAMjB,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0btD,CAAC;AA2FF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"AriaStandaloneUI.d.ts","sourceRoot":"","sources":["../../src/components/AriaStandaloneUI.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA4C,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAQV,KAAK,EACN,MAAM,SAAS,CAAC;AAMjB,UAAU,qBAAqB;IAC7B,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA6btD,CAAC;AA2FF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AriaWidget.d.ts","sourceRoot":"","sources":["../../src/components/AriaWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOnD,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAgmB1C,CAAC"}
1
+ {"version":3,"file":"AriaWidget.d.ts","sourceRoot":"","sources":["../../src/components/AriaWidget.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAOnD,UAAU,eAAe;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA6kB1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AriaProvider.d.ts","sourceRoot":"","sources":["../../src/context/AriaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAW1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CA6hB9C,CAAC"}
1
+ {"version":3,"file":"AriaProvider.d.ts","sourceRoot":"","sources":["../../src/context/AriaProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAW1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK7C,UAAU,iBAAiB;IACzB,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAgiB9C,CAAC"}