【问题标题】:Error when starting watchman启动 watchman 时出错
【发布时间】:2018-05-09 08:06:48
【问题描述】:

嗨,当我想使用“react-native start”启动我的应用程序时,我收到了这个错误。有人知道该怎么做吗?我试图将watchman文件夹和项目文件夹的权限更改为chmod -R 777 'path'

Metro Bundler ready.

Loading dependency graph...watchman warning:  opendir(/home/t/react/testApp/android/app/build/generated/source/r/debug/com) -> Permission denied. Marking this portion of the tree deleted
Recrawled this watch 1 times, most recently because:
/home/t/react/testApp: dir missing from internal state
To resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del /home/t/react/testApp ; watchman watch-project /home/t/react/testApp`

opendir(/home/t/react/testApp/android/app/build/generated/source/r/debug/com) -> Permission denied. Marking this portion of the tree deleted
Recrawled this watch 1 times, most recently because:
/home/t/react/testApp: dir missing from internal state
To resolve, please review the information on
https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
To clear this warning, run:
`watchman watch-del /home/t/react/testApp ; watchman watch-project /home/t/react/testApp`

Loading dependency graph, done.

【问题讨论】:

    标签: javascript react-native npm watchman


    【解决方案1】:

    您是否尝试过从源代码的根目录运行此脚本 - 通常可以解决我的守望问题:

    React Native Clean

    你可以从你的package.json所在的目录运行如下:

    # Download
    wget https://gist.githubusercontent.com/jesussteve/45a9251e4d1419283086379e069aed56/raw/fb0107399b684dad3fecbc1af478575bfe0cb65f/react-native-clean.sh
    
    # Set permissions
    chmod a+x react-native-clean.sh
    
    # Run script from current path
    ./react-native-clean.sh ./
    
    

    建议运行前先备份,以防万一。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-27
      • 1970-01-01
      • 2013-12-08
      • 2017-11-04
      • 2011-02-05
      • 2011-09-06
      相关资源
      最近更新 更多