每次我尝试将我的应用程序部署到 android 时,我都会得到这个,它会破坏我的 Metro 服务器。我试过更新我的环境变量。events.js:174 throw er; // Unhandled 'error' event ^Error: EPERM: operation not permitted, lstat 'C:\Users\user\Documents\DEV\react-native-dualscreen\dualscreeninfo\examples\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\androidx\lifecycle\viewmodel'Emitted 'error' event at: at NodeWatcher.<anonymous> (C:\Users\user\Documents\DEV\react-native-dualscreen\dualscreeninfo\examples\node_modules\sane\src\node_watcher.js:291:16) at FSReqWrap.oncomplete (fs.js:153:21)
1 回答

慕码人8056858
TA贡献1803条经验 获得超6个赞
我猜这个问题的发生是因为你的 Windows env 路径设置,确切的解决方案是:添加%SystemRoot%\system32
到你的 PATH,按照以下步骤操作:
右键单击桌面上的我的电脑。
单击属性。
在“系统属性”窗口中,单击“高级”选项卡,然后单击“环境变量”。
在系统变量窗口中,突出显示路径,然后单击编辑。
在“编辑系统变量”窗口中,将光标插入变量值字段的末尾。
如果最后一个字符不是分号 (;),则添加一个。
在最后一个分号后,键入要查找的文件的完整路径。
%SystemRoot%\system32
在每个打开的窗口中单击确定
重启系统
提示:记住,您应该重新启动系统。重启后这个问题就会消失。
添加回答
举报
0/150
提交
取消