v0.18.1 contains a corrupt lib/module/AnimateableText.web.js. The sourcemap comment at the end of the file is concatenated with a chunk of code:
import * as React from 'react';
import { Text } from 'react-native';
export const AnimateableText = /*#__PURE__*/React.forwardRef((props, ref) => {
const [text, setText] = React.useState(props.text);
const animatedTextRef = React.useRef(null);
// just in case users tried to update the value without
// a shared value
React.useEffect(() => {
if (props.text) {
setText(props.text);
}
}, [props.text]);
React.useImperativeHandle(ref, () => ({
setNativeProps: nativeProps => {
if (animatedTextRef.current && nativeProps.text) {
setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
}
}
}), []);
return /*#__PURE__*/React.createElement(Text, {
ref: animatedTextRef,
...props
}, text);
});
//# sourceMappingURL=AnimateableText.web.js.maptext) {
setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
}
}
}), []);
return /*#__PURE__*/React.createElement(Text, _extends({
ref: animatedTextRef
}, props), text);
});
//# sourceMappingURL=AnimateableText.web.js.map
Metro error: SyntaxError: /node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js: Unexpected token (27:6)
25 | //# sourceMappingURL=AnimateableText.web.js.maptext) {
26 | setText(nativeProps === null || nativeProps === void 0 ? void 0 : nativeProps.text);
> 27 | }
| ^
28 | }
29 | }), []);
30 | return /*#__PURE__*/React.createElement(Text, _extends({
Call Stack
(node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js:27:7)
v0.18.1 contains a corrupt
lib/module/AnimateableText.web.js. The sourcemap comment at the end of the file is concatenated with a chunk of code:Metro error: SyntaxError: /node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js: Unexpected token (27:6)
Call Stack
(node_modules/react-native-animateable-text/lib/module/AnimateableText.web.js:27:7)