How can i make this working. I tried giving sudo permissoins

Viewed 3480

** I'm currently using linux. and tried with starting the app with sudo permission and it didn't work. ** I just installed expo-cli and created new project. When I start the app. It shows

Error message

Failed to construct transformer:  Error: EACCES: permission denied, open '/tmp/haste-map-metro-4-36677ec4ffe69a9c48969ce0c6048f0e-05d9595d1f7d32f85d732f06fd3b25e9'
    at Object.openSync (fs.js:465:3)
    at Object.writeFileSync (fs.js:1416:35)
    at Object.writeFileSync (/home/muthu/workspace/bootcamp/native/first/node_modules/jest-serializer/build/index.js:196:21)
    at HasteMap._persist (/home/muthu/workspace/bootcamp/native/first/node_modules/jest-haste-map/build/index.js:944:31)
    at /home/muthu/workspace/bootcamp/native/first/node_modules/jest-haste-map/build/index.js:497:17
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/muthu/workspace/bootcamp/native/first/node_modules/jest-haste-map/build/index.js:193:24)
    at _next (/home/muthu/workspace/bootcamp/native/first/node_modules/jest-haste-map/build/index.js:213:9) {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/tmp/haste-map-metro-4-36677ec4ffe69a9c48969ce0c6048f0e-05d9595d1f7d32f85d732f06fd3b25e9'
}
2 Answers

Changing the permission on your tmp folder will resolve that, try with:

chmod -R 0777 /tmp

Run:

sudo chmod -R 0777 /tmp
sudo chmod 700 /tmp/root-states
Related