javascript 启动watchman时出错

9ceoxa92  于 2023-01-01  发布在  Java
关注(0)|答案(1)|浏览(382)

嗨,当我想用“react-native start”启动我的应用程序时,我收到这个错误。有人知道该怎么做吗?我尝试将watchman文件夹和project文件夹的权限更改为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.
hmmo2u0o

hmmo2u0o1#

你有没有试过从你的源代码的根目录运行这个脚本-通常修复我的watchman烦恼:
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 ./

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

相关问题