加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

React Native starter project bundling fails with Unexpected

发布时间:2020-12-15 06:53:21 所属栏目:百科 来源:网络整理
导读:新建了一个react-native 项目 react -native init Democd Demoreact -native run -android 按照顺序run的时候发现Android模拟器屏幕上显示服务器返回500的response,终端错误如标题所示: React Native starter project bundling fails with Unexpected Toke

新建了一个react-native 项目

react-native init Demo
cd Demo
react-native run-android

按照顺序run的时候发现Android模拟器屏幕上显示服务器返回500的response,终端错误如标题所示:
React Native starter project bundling fails with Unexpected Token error
参考链接
https://stackoverflow.com/questions/45725376/react-native-starter-project-bundling-fails-with-unexpected-token-error
主要是babel-preset-react-native3.0.0的一些bug,先在package.json中将该行改为
"babel-preset-react-native": "2.1.0",
在终端

rm -rf node_modules
npm install

之后再run就可以啦 ^^

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读