react-native link 给出错误没有这样的文件或目录 info.plist
react-native link giving error no such file or directory info.plist
我正在尝试将新字体添加到我的 react-native 项目中。
我在package.json
中添加了这个
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
并在项目中的 assets 文件夹中添加了相应的字体文件。
在link过程中我需要的字体运行-
react-native link
但是在 运行 执行上述命令时出现此错误 -
Error: ENOENT: no such file or directory, open '/private/var/native-testProject/ios/"tests_tvOSTests/Info.plist"'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at Object.<anonymous> (/private/var/www/native-testProject/node_modules/react-native-code-push/scripts/postlink/ios/postlink.js:63:24)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
在查看项目结构时,我也找到了 info.plist
文件。
我对 react-native 很陌生,我不知道我哪里错了。
在查看文档时我发现我需要 运行
react-native upgrade
我当时的问题是,当我 运行 升级时,项目结构中没有引用 tests_tvOSTests
一切都已到位。
我正在尝试将新字体添加到我的 react-native 项目中。
我在package.json
中添加了这个 "rnpm": {
"assets": [
"./assets/fonts/"
]
}
并在项目中的 assets 文件夹中添加了相应的字体文件。
在link过程中我需要的字体运行-
react-native link
但是在 运行 执行上述命令时出现此错误 -
Error: ENOENT: no such file or directory, open '/private/var/native-testProject/ios/"tests_tvOSTests/Info.plist"'
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at Object.<anonymous> (/private/var/www/native-testProject/node_modules/react-native-code-push/scripts/postlink/ios/postlink.js:63:24)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
在查看项目结构时,我也找到了 info.plist
文件。
我对 react-native 很陌生,我不知道我哪里错了。
在查看文档时我发现我需要 运行
react-native upgrade
我当时的问题是,当我 运行 升级时,项目结构中没有引用 tests_tvOSTests
一切都已到位。