我跑步时一直收到此错误
react-native run-ios
Installing build/Build/Products/Debug-iphonesimulator/vepo.app
Launching org.reactjs.native.example.vepo
org.reactjs.native.example.vepo: 6625
Benjamins-MBP:frontend Ben$ react-native run-ios
fs.js:115
throw err;
^
Error: EACCES: permission denied, open '/Users/Ben/Development/Projects/vepo/frontend/node_modules/.cache/@babel/register/.babel.7.2.2.development.json'
at Object.openSync (fs.js:439:3)
at Object.writeFileSync (fs.js:1190:35)
at save (/Users/Ben/Development/Projects/vepo/frontend/node_modules/@babel/register/lib/cache.js:52:15)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
我跑步时一直收到此错误
sudo react-native run-ios
/Users/Ben/Development/Projects/vepo/frontend/node_modules/mkdirp/index.js:90
throw err0;
^
Error: EACCES: permission denied, mkdir '/Users/Ben/Development/Projects/vepo/frontend/node_modules/react-native/node_modules/.cache'
at Object.mkdirSync (fs.js:753:3)
at sync (/Users/Ben/Development/Projects/vepo/frontend/node_modules/mkdirp/index.js:71:13)
at sync (/Users/Ben/Development/Projects/vepo/frontend/node_modules/mkdirp/index.js:77:24)
at sync (/Users/Ben/Development/Projects/vepo/frontend/node_modules/mkdirp/index.js:77:24)
at save (/Users/Ben/Development/Projects/vepo/frontend/node_modules/@babel/register/lib/cache.js:50:20)
at process._tickCallback (internal/process/next_tick.js:61:11)
at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
Process terminated. Press <enter> to close the window
我尝试更改错误中的特定文件和整个文件夹的读取/写入权限。我该怎么办?
编辑: 我读到它可能是未正确安装节点,所以用brew重新安装了节点。同样的错误。
答案 0 :(得分:0)
在命令前键入“ sudo”。
sudo react-native run-ios