Express ReferenceError:[BABEL]/home/sriram/Desktop/goodbet/client/scripts/test.js:未知选项:/node\u modules/BABEL预置react app/index.js.overrides

Express ReferenceError:[BABEL]/home/sriram/Desktop/goodbet/client/scripts/test.js:未知选项:/node\u modules/BABEL预置react app/index.js.overrides,express,jestjs,babeljs,create-react-app,Express,Jestjs,Babeljs,Create React App,我在使用jest运行npm测试时遇到以下错误。我有一个express应用程序,里面有一个客户端文件夹,它是create-react-app-2,当我弹出它时,问题就出现了。现在该怎么办 Test suite failed to run ReferenceError: [BABEL] /home/sriram/Desktop/gooodbet/client/scripts/test.js: Unknown option: /home/sriram/Desktop/gooodbet/cli

我在使用jest运行npm测试时遇到以下错误。我有一个express应用程序,里面有一个客户端文件夹,它是create-react-app-2,当我弹出它时,问题就出现了。现在该怎么办

Test suite failed to run

    ReferenceError: [BABEL] /home/sriram/Desktop/gooodbet/client/scripts/test.js: Unknown option: /home/sriram/Desktop/gooodbet/client/node_modules/babel-preset-react-app/index.js.overrides. Check out http://babeljs.io/docs/usage/options/ for more information about options.

    A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

    Invalid:
      `{ presets: [{option: value}] }`
    Valid:
      `{ presets: [['presetName', {option: value}]] }`

    For more detailed information on preset configuration, please see https://babeljs.io/docs/en/plugins#pluginpresets-options. (While processing preset: "/home/sriram/Desktop/gooodbet/client/node_modules/babel-preset-react-app/index.js")

      at Logger.error (node_modules/babel-core/lib/transformation/file/logger.js:41:11)
      at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:226:20)
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14
      at node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22
          at Array.map (<anonymous>)
      at OptionManager.resolvePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
      at OptionManager.mergePresets (node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
      at OptionManager.mergeOptions (node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
      at OptionManager.init (node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
      at File.initOptions (node_modules/babel-core/lib/transformation/file/index.js:212:65)


 RUNS  tests/integration/localAuth.test.js
 FAIL  tests/integration/localAuth.test.js
  localAuth
    POST /api/signup
      ✓ should signup successfully (536ms)
      ✕ should send 400 for not having email (8ms)

  ● localAuth › POST /api/signup › should send 400 for not having email

    Bad Request

      at Test.Object.<anonymous>.Request.callback (node_modules/superagent/lib/node/index.js:804:15)
      at IncomingMessage.parser (node_modules/superagent/lib/node/index.js:1036:18)

Test Suites: 2 failed, 2 total
Tests:       1 failed, 1 passed, 2 total
Snapshots:   0 total
Time:        2.378s
Ran all test suites.
测试套件无法运行
ReferenceError:[BABEL]/home/sriram/Desktop/goodbet/client/scripts/test.js:未知选项:/home/sriram/Desktop/goodbet/client/node_modules/BABEL预置react app/index.js.overrides。退房http://babeljs.io/docs/usage/options/ 有关选项的详细信息。
此错误的常见原因是存在没有相应预设名称的配置选项对象。例子:
无效:
`{预设:[{选项:值}]}`
有效期:
`{预设:['presetName',{option:value}]}`
有关预设配置的更多详细信息,请参阅https://babeljs.io/docs/en/plugins#pluginpresets-选项。(处理预设时:“/home/sriram/Desktop/goodbet/client/node\u modules/babel preset react app/index.js”)
at Logger.error(node_modules/babel core/lib/transformation/file/Logger.js:41:11)
在OptionManager.mergeOptions(node_modules/babel core/lib/transformation/file/options/option manager.js:226:20)
在node_modules/babel core/lib/transformation/file/options/option manager.js:265:14
在node_modules/babel core/lib/transformation/file/options/option manager.js:323:22
在Array.map()处
在OptionManager.resolvePresets(node_modules/babel core/lib/transformation/file/options/option manager.js:275:20)
在OptionManager.mergePresets(node_modules/babel core/lib/transformation/file/options/option manager.js:264:10)
在OptionManager.mergeOptions(node_modules/babel core/lib/transformation/file/options/option manager.js:249:14)
在OptionManager.init(node_modules/babel core/lib/transformation/file/options/option manager.js:368:12)
在File.initOptions(node_modules/babel core/lib/transformation/File/index.js:212:65)
运行测试/integration/localAuth.test.js
失败测试/integration/localAuth.test.js
本地授权
POST/api/注册
✓ 应成功注册(536ms)
✕ 如果没有电子邮件,应发送400(8ms)
● localAuth›POST/api/signup›因没有电子邮件而应发送400
错误的请求
在Test.Object..Request.callback(node_modules/superagent/lib/node/index.js:804:15)
在IncomingMessage.parser(node_modules/superagent/lib/node/index.js:1036:18)
测试套件:2个失败,共2个
测试:1次失败,1次通过,共2次
快照:共0个
时间:2.378秒
运行所有测试套件。
我按照这个步骤

撤销CreateReact应用程序的弹出,一切都正常了

撤销CreateReact应用程序的弹出,现在一切正常