yarn compile error
The problem
TypeError: src/vendor/react-native/Animated/createAnimatedComponent.js: Property consequent of ConditionalExpression expected node to be of a type ["Expression"] but instead got null How to reproduce
Simplified test case:
Steps to reproduce: When I run "yarn compile";
TypeError: src/vendor/react-native/Animated/createAnimatedComponent.js: Property consequent of ConditionalExpression expected node to be of a type ["Expression"] but instead got null at Object.validate (/Users/mac/Downloads/react-native-web-master/node_modules/babel-types/lib/definitions/index.js:109:13) at Object.validate (/Users/mac/Downloads/react-native-web-master/node_modules/babel-types/lib/index.js:505:9) at NodePath._replaceWith (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/replacement.js:176:7) at NodePath._remove (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/removal.js:58:10) at NodePath.remove (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/removal.js:30:8) at Array.enter (/Users/mac/Downloads/react-native-web-master/node_modules/babel-template/lib/index.js:129:12) at NodePath._call (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/context.js:76:18) at NodePath.call (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/context.js:44:14) at NodePath.visit (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/path/context.js:105:12) at TraversalContext.visitQueue (/Users/mac/Downloads/react-native-web-master/node_modules/babel-traverse/lib/context.js:150:16) src/modules/TransformPropTypes/index.js -> dist/cjs/modules/TransformPropTypes/index.js error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. src/modules/UnimplementedView/index.js -> dist/cjs/modules/UnimplementedView/index.js src/modules/applyLayout/index.js -> dist/cjs/modules/applyLayout/index.js error Command failed with signal "SIGTERM". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ERROR: "compile:es --" exited with 1. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Environment (include versions). Did this work in previous versions?
- React Native for Web (version): 0.8.9
- React (version): react@^16.4.1
- Browser: chrome
I can't reproduce this and there's no information to help me understand what context this might occur in
me too!
I change “preset.js” ['babel-plugin-transform-react-remove-prop-types', { mode: 'remove' }] It`s OK.But I don·t known why。