【发布时间】:2020-08-22 12:40:17
【问题描述】:
我对 React Native 和 Detox 还很陌生,并且在调试此问题的根本原因时遇到了一些问题。
对于我们的测试环境,我们首先使用
npm run e2e -- --docker start
e2e 脚本在 package.json 中定义为
"e2e": "ts-node e2e/runner.ts",
我得到的错误是:
@cb/mobile@0.0.1 e2e /Users/rishabhharit/Documents/GitHub/clearbook/packages/cb-mobile ts-node e2e/runner.ts "--docker" "start" /Users/rishabhharit/Documents/GitHub/clearbook/packages/cb-mobile/node_modules/react-native/Libraries/Utilities/warnOnce.js:15 const warnedKeys: {[string]: boolean} = {}; ^^^^^^^^^^ SyntaxError: Missing initializer in const declaration at wrapSafe (internal/modules/cjs/loader.js:891:16) at Module._compile (internal/modules/cjs/loader.js:941:27) at Module._extensions..js (internal/modules/cjs/loader.js:1011:10) at Object.require.extensions.<computed> [as .js] (/Users/rishabhharit/Documents/GitHub/clearbook/packages/cb-mobile/node_modules/ts-node/src/index.ts:807:44) at Module.load (internal/modules/cjs/loader.js:822:32) at Function.Module._load (internal/modules/cjs/loader.js:730:14) at Module.require (internal/modules/cjs/loader.js:864:19) at require (internal/modules/cjs/helpers.js:74:18) at Object.<anonymous> (/Users/rishabhharit/Documents/GitHub/clearbook/packages/cb-mobile/node_modules/react-native/Libraries/react-native/react-native-implementation.js:14:18) at Module._compile (internal/modules/cjs/loader.js:971:30) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @cb/mobile@0.0.1 e2e: `ts-node e2e/runner.ts "--docker" "start"` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @cb/mobile@0.0.1 e2e script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/rishabhharit/.npm/_logs/2020-05-07T08_58_41_483Z-debug.log [2020-05-07T08_58_41_483Z-debug.log](https://github.com/wix/Detox/files/4591898/2020-05-07T08_58_41_483Z-debug.log)
现在我不确定在哪里看。将根据要求提供更多信息。
【问题讨论】:
标签: react-native npm jestjs detox