小编Мих*_*кий的帖子

如何运行现有的 React Native 项目

我想下载并运行别人的项目,以考虑其功能。我遇到了许多问题......它并不适合开始,我只是不知道该怎么做,请帮助

https://github.com/sunlight3d/react_native_v0.49/tree/master/61-Realm%20React%20Native%235.Filter%20data%20and%20working%20with%20To-Many%20Relationships/code/tutorialProject

1)复制到工作文件夹教程项目

2)打开VS代码

3)进入工作文件夹,在cmd文件夹教程项目中点击打开

4)然后我进入react-native run-android 并获得惨败

d:\JS\tutorialProject>react-native init tutorialProject
 internal/modules/cjs/loader.js:657 throw err; ^

 Error: Cannot find module 'graceful-fs' at
 Function.Module._resolveFilename
 (internal/modules/cjs/loader.js:655:15) at Function.Module._load
 (internal/modules/cjs/loader.js:580:25) at Module.require
 (internal/modules/cjs/loader.js:711:19) at require
 (internal/modules/cjs/helpers.js:14:16) at Object.<anonymous>
 (d:\JS\tutorialProject\node_modules\react-native\local-cli\cli.js:12:1)
 at Module._compile (internal/modules/cjs/loader.js:805:30) at
 Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
 at Module.load (internal/modules/cjs/loader.js:672:32) at
 tryModuleLoad (internal/modules/cjs/loader.js:612:12) at
 Function.Module._load (internal/modules/cjs/loader.js:604:3)
Run Code Online (Sandbox Code Playgroud)

我开始使用谷歌搜索,发现与一些依赖关系有关。使用react-native init MyProject

5)react-native init tutorialProject并获得更紧的正确路线

我尝试通过启动服务器npm,然后这很有趣...... 6)npm-intall

d:\JS\tutorialProject>npm install npm WARN deprecated core-js@1.2.7:
 core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 …
Run Code Online (Sandbox Code Playgroud)

javascript windows android npm react-native

3
推荐指数
2
解决办法
1万
查看次数

标签 统计

android ×1

javascript ×1

npm ×1

react-native ×1

windows ×1