iosアプリのソースが私のラップにドロップされました(今度は2016年末)ので、シミュレータでビルドして実行しようとしています。私はReact Nativeを学んでいます。モジュールprop-typesを解決できませんでしたが、grep prop-typesは何も表示しません
完全なエラーメッセージはここにある:もちろん
Unable to resolve module prop-types from /Users/raarts/work/MobileApp/app/node_modules/react-redux/lib/components/Provider.js: Module does not exist in the module map or in these directories:
/Users/raarts/work/MobileApp/app/node_modules/react-redux/node_modules
, /Users/raarts/work/MobileApp/app/node_modules
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.
RCTFatal
-[RCTBatchedBridge stopLoadingWithError:]
__25-[RCTBatchedBridge start]_block_invoke_2
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
UIApplicationMain
main
start
私は提案された解決策を試してみましたが、それは動作しませんでした。 私の問題は、Provider.jsを検査しましたが、 'prop-types'という単語はそのファイルにも存在しません。
{
"name": "app",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"lint": "./node_modules/.bin/eslint index*.js src __tests__",
"test": "jest"
},
"dependencies": {
"google-libphonenumber": "^2.0.10",
"prop-types": "^15.5.10",
"react": "15.4.2",
"react-native": "0.40.0",
"react-native-contacts": "^0.7.1",
"react-native-debug-stylesheet": "^0.1.1",
"react-native-device-info": "^0.9.7",
"react-native-i18n": "^0.1.1",
"react-native-keyboard-aware-scroll-view": "^0.2.8",
"react-native-modalbox": "^1.3.9",
"react-native-router-flux": "^3.36.0",
"react-native-scrollable-tab-view": "^0.7.0",
"react-native-send-intent": "^1.0.13",
"react-redux": "^4.4.5",
"redux": "^3.6.0",
"redux-actions": "^0.12.0",
"redux-thunk": "^2.1.0"
},
"jest": {
"preset": "react-native"
},
"devDependencies": {
"babel-eslint": "^7.0.0",
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"chai": "^3.5.0",
"eslint": "^3.12.1",
"eslint-plugin-react": "^6.4.1",
"eslint-plugin-react-native": "^2.2.1",
"fetch-mock": "^5.6.0",
"jest": "18.1.0",
"jest-react-native": "16.0.0",
"react-test-renderer": "15.4.2",
"redux-mock-store": "^1.2.1"
}
}
が私の周りグーグル、プロップタイプが15.5に反応して廃止されましたPropTypesの代替として別のパッケージの中に離脱したようだ。
はここでpackage.jsonです。だから私の最初の推測では、依存パッケージの中にはprop-types
を使っているものがありました。しかし、私が 'prop-types'のnode_modulesツリー全体をgreptし、どこにも言及されていなかったのは驚いたことです(eslint-plugin-reactのchangelogで受け入れます)。
だから私はうんざりです。ここで何が起きてるの?