【问题标题】:Unable to resolve path to module 'react-native-screens' (ESLint)无法解析模块“react-native-screens”(ESLint)的路径
【发布时间】:2020-06-07 19:16:00
【问题描述】:

在我的 VS 代码中出现此 lint 错误:

无法解析模块路径 'react-native-screens'.eslint(import/no-unresolved) 模块 “反应原生屏幕”

【问题讨论】:

    标签: reactjs react-native


    【解决方案1】:

    您需要再安装 3 个库 react-native-gesture-handler、react-native-reanimated 和 react-native-screens 为了使用导航。

    运行这段代码:

    npm install --save react-native-gesture-handler react-native-reanimated react-native-screens
    

    欲了解更多信息,请访问 - here

    如果您对 screen 包有唯一的问题,请仅安装该依赖项

    希望这会有所帮助:)

    【讨论】:

    • @DeSilva 很高兴它有帮助 :) 在安装之前正确阅读文档
    猜你喜欢
    • 2019-06-30
    • 1970-01-01
    • 2021-11-10
    • 2022-12-19
    • 2022-01-15
    • 2021-12-13
    • 2021-06-05
    • 1970-01-01
    • 2020-05-01
    相关资源
    最近更新 更多