javascript - React Native node_modules package errors
问题描述
While trying to run the server with the command 'node server', I'm getting an Error:
C:...path...\node_modules\react-native\index.js:13
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
^^^^^^
SyntaxError: Cannot use import statement outside a module
I tried to figure out the error, and got into that 'index', I saw a lot of errors like:
import typeof AccessibilityInfo from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
Error saying: ';' expected.
I did not mess with the node_modules package so I've no idea where did those errors came from.
Versions:
"react": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
Anyone who knows how to handle that problem ?
解决方案
推荐阅读
- javascript - 如何从 Javascript 中的类内部创建类
- c++ - 有没有更好的方法来移动向量中的元素
- rxjs - 每 1000 毫秒间隔获取一个事件
- javascript - 如何用自身+ 1替换字符串中的数字?
- python - 在 SQLAlchemy Column() 中,是否需要同时定义 default= 和 server_default?
- vb.net - 设置字符串变量的对象引用错误
- .net - 如何检查 .NET 中是否支持 TLS1.2
- javascript - JS:按索引对对象数组中的嵌套数组进行切片
- python - 如何将前导零添加到数组的所有元素?
- python-3.x - 用python实时读取时间的最佳方法是什么?