mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
237ddb4dbf
Summary:
Changelog: [Internal]
The import style used
```
npm ERR! /home/circleci/react-native/packages/react-native-codegen/lib/parsers/typescript/modules/index.js:13
npm ERR! import {UnsupportedEnumDeclarationParserError} from '../../errors';
npm ERR! ^^^^^^
npm ERR!
npm ERR! SyntaxError: Cannot use import statement outside a module
npm ERR! at internalCompileFunction (node:internal/vm:73:18)
npm ERR! at wrapSafe (node:internal/modules/cjs/loader:1175:20)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1219:27)
npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
npm ERR! at Module.load (node:internal/modules/cjs/loader:1113:32)
npm ERR! at Module._load (node:internal/modules/cjs/loader:960:12)
npm ERR! at Module.require (node:internal/modules/cjs/loader:1137:19)
npm ERR! at require (node:internal/modules/helpers:121:18)
npm ERR! at Object.<anonymous> (/home/circleci/react-native/packages/react-native-codegen/lib/parsers/typescript/parser.js:60:19)
npm ERR! at Module._compile (node:internal/modules/cjs/loader:1255:14)
```
is not supported.
Reviewed By: philIip
Differential Revision: D56809538
fbshipit-source-id: 4b42f9e964d49c4fe3c3a4020eb2b3860fdd810c
@react-native/codegen
Installation
yarn add --dev @react-native/codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the React Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest packages/react-native-codegen.