1

I created a new React Native project and ran it in Xcode. I get following error in the terminal and can't figure how to fix:

ERROR EACCES, permission denied '/Users/andrey.pokrovskiy/.babel.json'
{"errno":3,"code":"EACCES","path":"/Users/andrey.pokrovskiy/.babel.json","syscall":"open"}
Error: EACCES, permission denied '/Users/andrey.pokrovskiy/.babel.json'
at Object.fs.openSync (evalmachine.:438:18)
at Object.fs.writeFileSync (evalmachine.:977:15)
at save (/Users/andrey.pokrovskiy/Desktop/lab/NewiOsApp/node_modules/react-native/node_modules/babel-core/lib/api/register/cache.js:35:19)
at process._tickCallback (node.js:419:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:906:3

I've tried chown the file and looked for a solution but no luck.

Meanwhile Xcode throws Apple Mach-o linker error with 25 errors inside. I never worked with Xcode so have no clue what that means.

Seemingly easy installation turned into a nightmare for me. Any help would be appreciated!

1 Answer 1

4

I had met the same problem, and I fixed it by executing the following command:

sudo chmod 777 /Users/xxxx/.babel.json

and then re-init the react-native project

react-native init awesome-project
Sign up to request clarification or add additional context in comments.

1 Comment

Worked for me without re-init the project.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.