[英]how to run an existing project of react native
我想下载并运行别人的项目,以考虑其功能。 我遇到了许多问题......它并不适合开始,我只是不知道该怎么做,请帮助
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)
我开始使用谷歌搜索,发现与某些依赖项有关。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
在这里我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了许多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了许多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了许多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了很多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了许多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
我想下载并运行其他人的项目以考虑其功能。 我遇到了许多问题...开始时并不合理,我只是不知道该怎么办,请帮忙
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)
我开始谷歌搜索,发现与某些依赖关系。 使用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
or at least to actual version of core-js@2. npm WARN deprecated
connect@2.30.2: connect 2.x series is deprecated npm ERR! path
d:\JS\tutorialProject\node_modules\.bin\react-native npm ERR! code
EEXIST npm ERR! Refusing to delete
d:\JS\tutorialProject\node_modules\.bin\react-native: is outside
d:\JS\tutorialProject\node_modules\react-native and not a link npm
ERR! File exists: d:\JS\tutorialProject\node_modules\.bin\react-native
npm ERR! Move it away, and try again.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\Nick\AppData\Roaming\npm-cache\_logs\2019-04-16T18_15_13_614Z-debug.log
而我绝对不知道。 如何运行别人的项目?
赶紧跑
npm cache clean --force
npm i
或npm install
安装 Chocolatey Chocolatey 是一个流行的 Windows 包管理器。 所以首先,我们需要在我们的系统上安装它。
要安装 Chocolaty,请以管理员权限打开命令提示符并运行以下命令。
@"%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System. Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\\chocolatey\\bin"
choco install -y nodejs.install python2 jdk8。
npm install –g react-native-cli
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.