【问题标题】:Error code 101 --no-packager with React Native toolkit in Visual Studio Code错误代码 101 --no-packager 与 Visual Studio Code 中的 React Native 工具包
【发布时间】:2020-06-09 15:57:28
【问题描述】:

我是 React Native 的新手,正在尝试让我的第一个 React 应用程序在 Android 模拟器上运行。运行调试器时收到此错误消息:

无法调试。执行命令时出错 'c:\Users...\weather4\node_modules.bin\react-native.cmd run-android --no-packager':执行命令 'c:\Users...\weather4\node_modules.bin\react-native.cmd run-android 时出错 --no-packager'(错误代码 101)

launch.json

{

"version": "0.2.0",
"configurations": [
    {
        "name": "Debug Android",
        "cwd": "${workspaceFolder}",
        "type": "reactnative",
        "request": "launch",
        "platform": "android"
    },
    {
        "name": "Attach to packager",
        "cwd": "${workspaceFolder}",
        "type": "reactnative",
        "request": "attach"
    },
    
   
]
}

settings.json

{
"dart.flutterSdkPath": "C:\\src\\flutter",
"react-native.packager.port": 19001
}

路径环境变量

C:\Users\...\.vscode\extensions\msjsdiag.vscode-react-native-0.16.0\src\common

【问题讨论】:

    标签: android react-native visual-studio-code


    【解决方案1】:

    我遇到了类似的错误并找到了这个修复:

    1. 从 Visual Studio Code 中卸载 Flutter(和 Dart)扩展。
    2. 关闭 Visual Studio Code,删除 .vscode 文件夹并再次打开 Visual Studio Code。
    3. 再次配置“运行和调试”面板,以便您可以运行应用程序。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-05-08
      • 1970-01-01
      • 1970-01-01
      • 2022-11-18
      • 1970-01-01
      • 2020-07-30
      • 1970-01-01
      相关资源
      最近更新 更多