Tôi nhận được lỗi cú pháp sau khi tôi khởi một ứng dụng sử dụng react-native init MyApp
Cú pháp lỗi khi initialising ứng dụng phản ứng bản địa sử dụng CLI
SyntaxError: /Users/MyAccount/RNProjects/app/node_modules/react-native/packager/react-packager/src/node-haste/index.js: You can only use Class Properties when the 'classProperties' plugin is enabled. (389:2)
387 | }
388 |
> 389 | static Cache;
| ^
390 | static Module;
391 | static Polyfill;
392 | static getAssetDataFromName;
at Parser.pp$5.raise (/Users/MyAccount/RNProjects/app/node_modules/babylon/lib/index.js:4380:13)
Tôi không có ý tưởng tại sao điều này xảy ra tất cả của một đột ngột. Nó đã hoạt động tốt trước đó. Tôi đoán tôi đã xóa một số tập tin cấu hình do nhầm lẫn trong khi mày mò.
Tôi cũng đang gặp phải điều này. phiên bản là: react-native-cli: 2.0.1, phản ứng bản địa: 0.41.2, sợi: 0.20.3, nút: v7.6.0 – IAmFledge