cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
618
Views
0
Helpful
3
Replies

react-widgets issue with react js

udube
Cisco Employee
Cisco Employee
Unknown Error: ReferenceError: process is not defined
 
Getting above error after installing below package:
npm install --save @webex/widget-recents
 
In Webpack.config added below fallback:
 resolve: {
        extensions: ['.js', '.ts', '.tsx'],
        fallback: {
            "fs": false,
            "crypto": require.resolve("crypto-browserify"),
            "swiper":false,
            "os": require.resolve("os-browserify"),
            "stream": require.resolve("stream-browserify"),
          },
    },
3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

Seems likely to be this issue: https://github.com/cisco/node-jose/issues/301

Workaround is to use browserify <= 16.5.1.

See this sample as a distillation of many hours of browser bundling pain

https://github.com/CiscoDevNet/webex-js-sdk-bundling-examples

Note the sample itself uses the Browser SDK (not Widgets), but I suspect the issues will be the same/similar.

udube
Cisco Employee
Cisco Employee

Please find below npm logs file for reference. 

I've not been able to reproduce that error, although I am seeing other issues with npm install. Install through NPM has not worked well for widgets in some time, and Engineering has not had the bandwidth to look into it at the moment. I would suggest to use CDN install (described here), that should work better. Note that the Widgets are a bit dated now, they've not been updated in some time, but should still work. Might be best to use the Browser/JS SDK directly though, as that's updated regularly with latest functionalities.