0
votes

I have problem when i try to run npm start

Error: EPERM: operation not permitted, read at Object.readSync (fs.js:498:3) at Object.readSync (C:\Users\Nidhal\ReactProjects\dieton\node_modules\graceful-fs\polyfills.js:143:28) at tryReadSync (fs.js:332:20) at Object.readFileSync (fs.js:361:19) at Object. (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:220:39) at Generator.next () at asyncGeneratorStep (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:78:24) at _next (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:98:9) at C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:103:7 at new Promise () type: 'Error', errno: -4048, syscall: 'read', code: 'EPERM' } (node:14128) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, read at Object.readSync (fs.js:498:3) at Object.readSync (C:\Users\Nidhal\ReactProjects\dieton\node_modules\graceful-fs\polyfills.js:143:28) at tryReadSync (fs.js:332:20) at Object.readFileSync (fs.js:361:19) at Object. (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:220:39) at Generator.next () at asyncGeneratorStep (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:78:24) at _next (C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:98:9) at C:\Users\Nidhal\ReactProjects\dieton\node_modules\jest-haste-map\build\worker.js:103:7 at new Promise () (node:14128) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14128) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

3
Your question is not clear. Want to create a React native project and launch an app?hong developer
Yes this what i want to donidhal belhadj salem

3 Answers

0
votes

We recommend installing Node and Python2 via Chocolatey, a popular package manager for Windows.

  1. Open an Administrator Command Prompt (right click Command Prompt and select "Run as Administrator"), then run the following command:

    choco install -y nodejs.install python2 jdk8

If you have already installed Node on your system, make sure it is Node 8.3 or newer. If you already have a JDK on your system, make sure it is version 8 or newer.

  1. npm install -g react-native-cli
  2. Install Android Studio
  3. Configure the ANDROID_HOME environment variable androidHome
  4. react-native init YourProject
  5. cd YourProject
  6. react-native run-android

Detailed description of the installation methods of installation

0
votes

Here is the few possible solution, you may try. Otherwise explain the issue in details

To access and make a change to current directory you need to run cmd as administrator.

Try to run cmd as administrator

Then do npm start, that will works in a normal console.

Otherwise-

npm cache clean --force

npm cache verify

Otherwise - You may also try to downgrade or upgrade the npm version

To uninstall:

npm uninstall npm -g

Install the Latest version:

npm install -g npm@latest

or

Install the previous version:

npm install [email protected] -g

0
votes

I recommend you to close the IDE(VSCode/WebStorm/etc) which used to open the code files and try npm install.