执行完npm install react-native-vector-icons --save 后,重启项目就打不开了

来源:2-7 TabNavigator精讲-2

青春有阵叛逆的风

2018-04-27

http://img.mukewang.com/szimg/5ae33b69000197ec03390665.jpg跟着老师做项目到【2-7 TabNavigator精讲-2】,发现到底部菜单的时候就卡住了,执行完npm install react-native-vector-icons --save 后,重启项目就打不开了http://img.mukewang.com/szimg/5ae33c47000112e908590505.jpg"react-native": "0.55.2",
"react-navigation": "^1.5.11"。下面是执行完命令的警告

npm WARN rm not removing /Users/xing/ap/node_modules/.bin/jsesc as it wasn't installed by /Users/xing/ap/node_modules/jsesc

npm WARN rm not removing /Users/xing/ap/node_modules/fsevents/node_modules/.bin/node-pre-gyp as it wasn't installed by /Users/xing/ap/node_modules/fsevents/node_modules/node-pre-gyp

npm WARN rm not removing /Users/xing/ap/node_modules/.bin/esparse as it wasn't installed by /Users/xing/ap/node_modules/esprima

npm WARN rm not removing /Users/xing/ap/node_modules/.bin/esvalidate as it wasn't installed by /Users/xing/ap/node_modules/esprima

npm WARN rm not removing /Users/xing/ap/node_modules/.bin/babylon as it wasn't installed by /Users/xing/ap/node_modules/babylon

npm WARN rm not removing /Users/xing/ap/node_modules/@babel/traverse/node_modules/.bin/babylon as it wasn't installed by /Users/xing/ap/node_modules/@babel/traverse/node_modules/babylon

npm WARN rm not removing /Users/xing/ap/node_modules/@babel/template/node_modules/.bin/babylon as it wasn't installed by /Users/xing/ap/node_modules/@babel/template/node_modules/babylon

npm WARN rm not removing /Users/xing/ap/node_modules/@babel/core/node_modules/.bin/babylon as it wasn't installed by /Users/xing/ap/node_modules/@babel/core/node_modules/babylon

npm notice created a lockfile as package-lock.json. You should commit this file.

+ react-native-vector-icons@4.6.0

added 4 packages, removed 1032 packages, updated 83 packages and moved 1 package in 37.445s

http://img.mukewang.com/szimg/5ae33dc90001043308750621.jpg

写回答

1回答

青春有阵叛逆的风

提问者

2018-04-29

删除node_modules文件夹 ,  项目下 运行  npm install 就可以了,重启项目解决问题

0
1
CrazyCodeBoy
good job
2018-05-03
共1条回复

React Native技术精讲与高质量上线App开发

一个真实的上线项目,一次完整的开发过程,全面掌握React Native技术

1577 学习 · 727 问题

查看课程