每个项目的本机启动都会失败

时间:2019-06-11 21:18:35

标签: javascript react-native

我一直在MacBook Pro上开发本机应用程序,但现在不得不使用台式Windows机器。我甚至无法让服务器开始在该项目或全新的npm start应用程序上使用react-native start --reset-cachereact-native init。我收到此错误消息:

我已经确保运行npm install和react-native链接

使用: *节点10.16.0 * npm 6.9.0 * react-native-cli 2.0.1 *“反应”:“ 16.8.3”, *“ react-native”:“ 0.59.4”,

npm start --reset-cache
react-native start --reset-cache

warning: the transform cache was reset.
Loading dependency graph...events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: UNKNOWN: unknown error, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)
Emitted 'error' event at:
    at NodeWatcher.checkedEmitError (H:\sampleproject\node_modules\metro\node_modules\sane\src\node_watcher.js:143:12)
    at FSWatcher.emit (events.js:198:13)
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:129:12)

2 个答案:

答案 0 :(得分:0)

使用react-native startreact-native run-android时是否返回相同的错误

答案 1 :(得分:0)

我已经克隆了存储库并在H:驱动器中创建了项目,但是一旦我在C:驱动器中运行了项目,它就可以按预期工作。