-
Couldn't load subscription status.
- Fork 67
Closed
Description
Hello,
I am trying to integrate the mongodb-stitch-browser-sdk into a nativescript vue app.
I am using es imports import { Stitch, AnonymousCredential } from 'mongodb-stitch-browser-sdk'; to start building the app and it is throwing an error which looks to be related to the sdk bundling in node-fetch (A node package inside of a browser sdk)
Here is a stacktrace
@file:///app/vendor.js:182:14
2 ../node_modules/assert/assert.js@file:///app/vendor.js:490:34
3 __webpack_require__@file:///app/bundle.js:76:34
4 @file:///app/vendor.js:626:33
5 ../node_modules/browserify-zlib/lib/binding.js@file:///app/vendor.js:1040:34
6 __webpack_require__@file:///app/bundle.js:76:34
7 @file:///app/vendor.js:1054:34
8 ../node_modules/browserify-zlib/lib/index.js@file:///app/vendor.js:1666:34
9 __webpack_require__@file:///app/bundle.js:76:34
10 @file:///app/vendor.js:32994:33
11 ../node_modules/node-fetch/lib/index.es.js@file:///app/vendor.js:33190:34
12 __webpack_require__@file:///app/bundle.js:76:34
13 ../node_modules/cross-fetch/dist/node-ponyfill.js@file:///app/vendor.js:8598:36
14 __webpack_require__@file:///app/bundle.js:76:34
15 ../node_modules/mongodb-stitch-core-sdk/dist/esm/internal/net/FetchTransport.js@file:///app/vendor.js:16222:88
16 __webpack_require__@file:///app/bundle.js:76:34
17 ../node_modules/mongodb-stitch-core-sdk/dist/esm/index.js<…>
JavaScript error:
file:///app/vendor.js:182:14: JS ERROR TypeError: util.inherits is not a function. (In 'util.inherits(assert.AssertionError, Error)', 'util.inherits' is an instance of Object)
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: util.inherits is not a function. (In 'util.inherits(assert.AssertionError, Error)', 'util.inherits' is an instance of Object)
at
Metadata
Metadata
Assignees
Labels
No labels