You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Apollo client in my code to connect to a database and I'm using async storage somewhere in its implementation .
To import async storage, I have:
However, I get the following error. The error goes away once don't use async storage at all. In fact, the line which requires async storage alone causes the following problem.
node_modules/.bin/mocha e2e --opts e2e/mocha.opts
/Users/hossein/Documents/react-native-projects/myapp/node_modules/react-native/Libraries/react-native/react-native-implementation.js:17
if (__DEV__) {
^
ReferenceError: __DEV__ is not defined
at Object.<anonymous> (/Users/hossein/Documents/react-native-projects/myapp/node_modules/react-native/Libraries/react-native/react-native-implementation.js:17:5)
at Module._compile (module.js:571:32)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/hossein/Documents/react-native-projects/myapp/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/hossein/Documents/react-native-projects/myapp/e2e/DatabaseAPIs/clientsForTest.js:2:18)
at Module._compile (module.js:571:32)
at loader (/Users/hossein/Documents/react-native-projects/myapp/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/hossein/Documents/react-native-projects/myapp/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/hossein/Documents/react-native-projects/myapp/e2e/DatabaseAPIs/APIs.js:4:23)
at Module._compile (module.js:571:32)
at loader (/Users/hossein/Documents/react-native-projects/myapp/node_modules/babel-register/lib/node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (/Users/hossein/Documents/react-native-projects/myapp/node_modules/babel-register/lib/node.js:154:7)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at /Users/hossein/Documents/react-native-projects/myapp/node_modules/mocha/lib/mocha.js:230:27
at Array.forEach (native)
at Mocha.loadFiles (/Users/hossein/Documents/react-native-projects/myapp/node_modules/mocha/lib/mocha.js:227:14)
at Mocha.run (/Users/hossein/Documents/react-native-projects/myapp/node_modules/mocha/lib/mocha.js:513:10)
at Object.<anonymous> (/Users/hossein/Documents/react-native-projects/myapp/node_modules/mocha/bin/_mocha:480:18)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
at startup (bootstrap_node.js:147:9)
at bootstrap_node.js:538:3
child_process.js:524
throw err;
^
Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts
at checkExecSyncError (child_process.js:481:13)
at Object.execSync (child_process.js:521:13)
at Object.<anonymous> (/Users/hossein/Documents/react-native-projects/myapp/node_modules/detox/local-cli/detox-test.js:46:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
The text was updated successfully, but these errors were encountered:
I'm using Apollo client in my code to connect to a database and I'm using
async storage
somewhere in its implementation .To import
async storage
, I have:And then I use it as follows:
However, I get the following error. The error goes away once don't use
async storage
at all. In fact, the line which requiresasync storage
alone causes the following problem.The text was updated successfully, but these errors were encountered: