Connection errors

I am trying to start a new project in React Native, but I am getting errors when I try to start the iOS Simulator. I haven't edited index.ios.js. I am using iOS Simulator to run a project, and the error in the emulator is "Failed to connect to development server ..."

Searching for JS files in / Users / jeff / Documents / TestApp

ERRORS EACCES, permission denied '/Users/jeff/.babel.json' {"ERRNO": - 13, "Code": "EACCES", "path": "/Users/jeff/.babel.json", "System call ":" open "} Error: EACCES, permission denied '/Users/jeff/.babel.json' on error (native) in Object.fs.openSync (evalmachine.:500:18) in Object.fs.writeFileSync ( evalmachine.:1099:15) to save (/ Users / jeff / Documents / TestApp / node_modules / react-native / node_modules / babel-core / lib / api / register / cache.js: 35:19) on process._tickCallback ( node.js: 355: 11) in Function.Module.runMain (module.js: 503: 11) when running (node.js: 129: 16) on node.js: 814: 3

See http://facebook.github.io/react-native/docs/troubleshooting.htmlfor common problems and solutions. evalmachine.:565 fs.write = function (fd, buffer, offset, length, position, callback) {^ Error: EACCES, permission denied '/Users/jeff/.babel.json' on error (native) in Object.fs .openSync (evalmachine.:500:18) to Object.fs.writeFileSync (evalmachine.:1099:15) to process.save (/ Users / jeff / Documents / TestApp / node_modules / react-native / node_modules / babel-core / lib / api / register / cache.js: 35: 19) on process.emit (events.js: 107: 17) on process.exit (node.js: 600: 17) in process. (/Users/jeff/Documents/TestApp/node_modules/react-native/packager/packager.js:143:11) at process.emit (events.js: 107: 17) at process._fatalException (node.js: 236: 26) The process is complete. Click to close the window

+3


source to share


3 answers


I fixed this issue and ran the following command

sudo chmod 777 ~/.babel.json

      



and then restart the initiative project, it will be successful.

+21


source


You can try simply

nvm alias default iojs-v2

      

If that doesn't work, try all the steps in the installation guide again . Then in the project folder



rm -rf node_modules/
npm i

      

In Xcode remove RCTWebSocketDebugger

from your libraries: YourProject > Libraries > RCTWebSocketDebugger

Then in Xcode Product -> Clean

and try to create again

0


source


Granting admin permission to the path ~/.babel.json

should help. Try this command:

sudo chmod 777 ~/.babel.json

      

-1


source







All Articles