我是新来的,希望我输入所有需要的信息。
尝试在我的应用中进行网络抓取时,出现错误
module...does not exist in the haste module map" with 'events' and 'stream'.
由于我在Windows上,因此我研究了问题,并尝试了https://github.com/facebook/react-native/issues/4968上的指导,但“守望者”步骤除外。 不幸的是,同一错误不断出现,只是使用了不同的模块。这次是抱怨的通行证。
我该怎么办?
我还尝试制作一个新的react-native-init项目,只是git克隆了我的src代码。仍然出现类似的错误。
{
"name": "Work",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"axios": "^0.18.0",
"cheerio": "^1.0.0-rc.2",
"events": "^3.0.0",
"firebase": "^5.0.3",
"htmlparser2": "^3.9.2",
"react": "16.3.1",
"react-native": "0.55.2",
"react-native-calendars": "^1.21.0",
"react-native-communications": "^2.2.1",
"react-native-fs": "^2.11.17",
"react-native-router-flux": "^4.0.0-beta.28",
"react-native-vector-icons": "^5.0.0",
"react-navigation": "^2.13.0",
"react-twitter-embedded-timeline": "^0.5.0",
"react-twitter-widgets": "^1.7.1"
},
"devDependencies": {
"babel-jest": "22.4.3",
"babel-preset-react-native": "4.0.0",
"jest": "22.4.3",
"react-test-renderer": "16.3.1"
},
"jest": {
"preset": "react-native"
}
}
答案 0 :(得分:0)
我的本机应用程序也遇到了同样的问题。 重置节点缓存为我解决了这个问题:
npm start -- --reset-cache
我希望对您有帮助