react-navigation をインストールして使用しようとすると、react-native を試していますが、エラーが発生します (「react-navigation」から {StackNavigator} をインポートします;)。
次のコマンドを使用して「react-navigation」をインストールします: npm install --save react-navigation
上記のコマンドを実行すると、 node_modulesフォルダーの下に'react-navigation'フォルダーが作成され、1 つのファイル ( package.json ) だけが作成されます。以下はファイルの内容です。
{
"_args": [
[
{
"raw": "react-navigation@0.0.0",
"scope": null,
"escapedName": "react-navigation",
"name": "react-navigation",
"rawSpec": "0.0.0",
"spec": "0.0.0",
"type": "version"
},
"/Users/rakesh-1812/Documents/REACT_JS/SimpleApp"
]
],
"_from": "react-navigation@0.0.0",
"_id": "react-navigation@0.0.0",
"_inCache": true,
"_location": "/react-navigation",
"_nodeVersion": "4.2.1",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/react-navigation-0.0.0.tgz_1459892254509_0.1584461957681924"
},
"_npmUser": {
"name": "ericvicenti",
"email": "ericvicenti@gmail.com"
},
"_npmVersion": "2.14.7",
"_phantomChildren": {},
"_requested": {
"raw": "react-navigation@0.0.0",
"scope": null,
"escapedName": "react-navigation",
"name": "react-navigation",
"rawSpec": "0.0.0",
"spec": "0.0.0",
"type": "version"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-0.0.0.tgz",
"_shasum": "1e0f865235cdb4d4aa8086484fd3690ff73df553",
"_shrinkwrap": null,
"_spec": "react-navigation@0.0.0",
"_where": "/Users/rakesh-1812/Documents/REACT_JS/SimpleApp",
"dependencies": {},
"description": "Coming Soon",
"devDependencies": {},
"directories": {},
"dist": {
"shasum": "1e0f865235cdb4d4aa8086484fd3690ff73df553",
"tarball": "https://registry.npmjs.org/react-navigation/-/react-navigation-0.0.0.tgz"
},
"maintainers": [
{
"name": "ericvicenti",
"email": "ericvicenti@gmail.com"
}
],
"name": "react-navigation",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"scripts": {},
"version": "0.0.0"
}
誰かが問題を解決するのを手伝ってくれませんか。前もって感謝します。