简体   繁体   中英

React Native application; Error starting packager: Error: EPERM: operation not permitted

WINDOWS 10 I've been trying to find the solution for this all day and haven't found a suitable answer. I am attempting to create a react native project. Earlier today, I was able to get past the point of creating the app, and then I got stuck trying to sync up my android device using Expo. While tinkering with my network settings I seem to have messed something up, because now I can't even get as far as the Expo screen in command prompt. I'm able to create the app in the terminal, and then when I enter 'npm start' it says it is starting packager, and then times out about 10 seconds later and gives some error messages. I have uninstalled and reinstalled nodejs, moved my project to a completely new folder, and the issue persists.

This is the code that prints out in the command prompt

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todoapp@0.1.0 start: react-native-scripts start
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todoapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\\Users\\cembr\\AppData\\Roaming\\npm-cache_logs\\2018-08-18T03_05_05_427Z-debug.log

Here is the debugging log:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\cembr\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@6.4.0
3 info using node@v8.11.4
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle todoapp@0.1.0~prestart: todoapp@0.1.0
6 info lifecycle todoapp@0.1.0~start: todoapp@0.1.0
7 verbose lifecycle todoapp@0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle todoapp@0.1.0~start: PATH: C:\Users\cembr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\cembr\OneDrive\Documents\Web Design\todoapp\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Gpg4win\..\GnuPG\bin;C:\Program Files\Microsoft VS Code\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\nodejs\;C:\Users\cembr\AppData\Local\Microsoft\WindowsApps;C:\Users\cembr\AppData\Local\Yarn\bin;C:\Users\cembr\AppData\Roaming\npm
9 verbose lifecycle todoapp@0.1.0~start: CWD: C:\Users\cembr\OneDrive\Documents\Web Design\todoapp
10 silly lifecycle todoapp@0.1.0~start: Args: [ '/d /s /c', 'react-native-scripts start' ]
11 silly lifecycle todoapp@0.1.0~start: Returned: code: 1  signal: null
12 info lifecycle todoapp@0.1.0~start: Failed to exec start script
13 verbose stack Error: todoapp@0.1.0 start: `react-native-scripts start`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Users\cembr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:304:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (C:\Users\cembr\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid todoapp@0.1.0
15 verbose cwd C:\Users\cembr\OneDrive\Documents\Web Design\todoapp
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\cembr\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.11.4
19 verbose npm  v6.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error todoapp@0.1.0 start: `react-native-scripts start`
22 error Exit status 1
23 error Failed at the todoapp@0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Try typing these commands

sudo sysctl -w fs.inotify.max_user_instances=1024
sudo sysctl -w fs.inotify.max_user_watches=12288

found from https://github.com/react-community/create-react-native-app/issues/533

This must be an error of NPM and by killing the node process using

kill -9 PID of the process you can start again the NPM then it will work.

for finding the process

lsof -i:8081 then

kill -9 PID of the process of node

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM