首页 > 解决方案 > 为什么我不能重新启动我的 react-native 应用程序?

问题描述

我是 react-native 的新手。

我开始启动我的应用程序,但是当我想重新启动它时,我得到了这个:

/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:83
    ps.stdout.on('data', function (data) {
              ^
TypeError: Cannot read property 'on' of undefined
    at buildProcessTree (/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:83:15)
    at /usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:104:11
    at Array.forEach (<anonymous>)
    at ChildProcess.onClose (/usr/local/lib/node_modules/expo-cli/node_modules/tree-kill/index.js:99:31)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:978:16)
    at Socket.stream.socket.on (internal/child_process.js:395:11)
    at Socket.emit (events.js:189:13)
    at Pipe._handle.close (net.js:610:12)

为什么我会得到这个?我用 npm start 启动我的 react-native 应用程序!

标签: react-native

解决方案


我找到了解决方案。

我不得不删除文件夹中的 .expo 文件。


推荐阅读