【发布时间】:2015-10-08 18:40:57
【问题描述】:
我正在尝试在 React Native 中启动一个新项目,但是当我尝试启动 iOS 模拟器时出现错误。我没有编辑 index.ios.js。我正在使用iOS模拟器运行项目,模拟器中的错误是'Could not connect to development server...'
在 /Users/jeff/Documents/TestApp 中寻找 JS 文件
错误 EACCES,权限被拒绝 '/Users/jeff/.babel.json' {"errno":-13,"code":"EACCES","path":"/Users/jeff/.babel.json","syscall":"open"} 错误:EACCES,权限被拒绝'/Users/jeff/.babel.json' 在错误(本机) 在 Object.fs.openSync (evalmachine.:500:18) 在 Object.fs.writeFileSync (evalmachine.:1099:15) 保存时(/Users/jeff/Documents/TestApp/node_modules/react-native/node_modules/babel-core/lib/api/register/cache.js:35:19) 在 process._tickCallback (node.js:355:11) 在 Function.Module.runMain (module.js:503:11) 启动时 (node.js:129:16) 在 node.js:814:3
见http://facebook.github.io/react-native/docs/troubleshooting.html 常见问题和解决方案。评估机器:565 fs.write = 函数(fd,缓冲区,偏移量,长度,位置,回调){ ^ 错误:EACCES,权限被拒绝'/Users/jeff/.babel.json' 在错误(本机) 在 Object.fs.openSync (evalmachine.:500:18) 在 Object.fs.writeFileSync (evalmachine.:1099:15) 在 process.save (/Users/jeff/Documents/TestApp/node_modules/react-native/node_modules/babel-core/lib/api/register/cache.js:35:19) 在 process.emit (events.js:107:17) 在 process.exit (node.js:600:17) 在过程中。 (/Users/jeff/Documents/TestApp/node_modules/react-native/packager/packager.js:143:11) 在 process.emit (events.js:107:17) 在 process._fatalException (node.js:236:26) 进程终止。按下关闭窗口
【问题讨论】:
-
您是否安装了
Watchman,是否在使用iojs? -
是的,用 brew 安装了守望者。我不得不单独安装iojs
-
我卸载了所有东西,然后重新安装了 brew、iojs、nvm 和 npm。现在,当我尝试在模拟器上运行项目时,出现此错误: packager.sh: line 19: node: command not found
标签: node.js react-native