Reputation: 1454
I just updated to React Native 0.21, but I am getting an error when I require Parse:
var Parse = require('parse/react-native').Parse;
The error I get is:
undefined is not a constructor (evaluating 'new _weakMap2.default()')
I don't believe it has to do with Parse though, as searching the directory, the 'weakMap2' reference is only found inside the react-proxy package.
Has anyone else experienced this error or found a workaround? Thanks!
Upvotes: 4
Views: 104
Reputation: 268265
This should be fixed in [email protected]
.
(Don’t use 2.x
, it’s not related to React Native at all currently!)
You can run npm install [email protected]
so NPM updates it locally. If you are using [email protected]
, you would need to run npm install [email protected]
inside node_modules/react-native/node_modules/react-transform-hmr
or something like this—check where it is installed and make sure it’s 1.x but up to date.
Upvotes: 2
Reputation: 633
I forced react-proxy
to version 2.0.1
and the error is now gone for me.
Upvotes: 0
Reputation: 773
Don't really know the issue but running Parse JS SDK as version 1.6.14 works for me. Have the same error as you when running latest 1.7.1. Hard to trace the error.
npm i [email protected] --save
Upvotes: 0