I wanted to download and run someone else's project in order to consider its functions. I ran into a number of problems ... that it does not deign to start, and I just don’t know what to do, help, please
1) copied to the working folder tutorial project
2) opened VS code
3) went into the working folder and clicked open in cmd folder tutorial project
4) then I enter react-native run-android
and get fiasco
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)
I started googling and found something to do with some dependencies. Using react-native init MyProject
5) react-native init tutorialProject
and getting the tighter right line
I try to start the server through npm
and then it's funny ...
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
and here I am absolutely don't know. How to run someone else's project?
all dependencies and plugins have configured in
package.json
file. so you need to install:then, you can start
or
When you download after you need to install all package in
package.json
then you need to start another terminal
it's for starting your bundler
finally you can run your project
possible answer: NPM, cannot find 'graceful-fs', no matter what I do he had the same issue of Error: Cannot find module 'graceful-fs'
From a computer with node install, you navigate a command line to the root of the project folder.
Then you install dependencies:
npm i
This installs all the libraries the project needs to build
Then you run the projects build script. This is defined in the projects package.json file. In that projects case, the script is called start. So:
npm run start