I've spent the last two days pouring over every shred of documentation and every tangentially related support thread I could find but have run into a dead end on this.
Working on a React-Native application for a client. They are insisting we use React-Native, and additionally, want to utilize Bing's Speech-to-Text API. Due to the length of audio clips they want to use (10-second minimum), we have to use the JavaScript WebSocket API provided by Microsoft (As the REST API only supports 5-second clips). Microsoft's implementation mandates the use of RequireJS. After running npm install requirejs --save
as per the instructions on requirejs.org and running the packager, requireJS fails to compile due to some missing libraries. Specifically:
'lang', 'prim', 'logger', 'env!env/file', 'parse', 'optimize',
'pragma', 'transform', 'requirePatch', 'env', 'commonJS', and 'source-map'
After investigating further these seem to be modules/libs which are in the full React environment for browsers, but which are not available in the React-Native environment. I've tried a quick npm install
on them, and it successfully got a few of them, but most threw errors. At this point I'm trying to figure out if there is some way to get these libs into React-Native, or if requireJS is simply incompatible with it. Any thoughts or guidance?
Thanks