300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > react-native 安装eslint启动报错Module `moment` does not exist in the Haste module map

react-native 安装eslint启动报错Module `moment` does not exist in the Haste module map

时间:2020-06-20 16:24:45

相关推荐

react-native 安装eslint启动报错Module `moment` does not exist in the Haste module map

如题,vscode安装完插件并配置完成以后,启动服务,报错:

Module `moment` does not exist in the Haste module map

查了一下代码,moment是有引入的,并且能够成功导向,按理说不应该出现这个问题

经过查阅资料分析出,可能是因为安装eslint模块导致node_modules解析出问题了,解决办法:

首先,运行:

npm install moment--save // 出现其他模块报类似错误,处理方式也是一致的

然后,运行:

yarn start --reset-cache或者npm start --reset-cache // 清理缓存后重启服务

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。