【发布时间】:2017-11-27 08:45:48
【问题描述】:
我有一个带有链接依赖项的 React Native 应用程序,它位于同一个父文件夹中:
home /
app / node_modules / [common_stuff]
common_stuff / ...
在我的.flowconfig 我有这些行:
[ignore]
../.*
<PROJECT_ROOT>/node_modules/common_stuff/.*
当我运行 flow 时,它给了我这个错误:
../common_stuff/node_modules/find-elm-dependencies/test/fixtures/malformed-elm-package-json/elm-package.json:
1: {-{ malformed JSON }-}
^ Unexpected token -
如何防止它跟随符号链接?
请注意,如果我删除 common_stuff/node_modules 文件夹,它会起作用。但显然,这不是解决方案。
编辑:我在使用react-native init MyProject 和yarn link common_stuff 完成的全新项目中尝试了相同的行为。
【问题讨论】: