[英]Error: Unable to resolve module `react-redux` from `C:\Users\wanuuu27\AwesomeProject\App.js`: Module `react-redux` does not exist
import React, { Component } from 'react';
import {Provider} from 'react-redux';
import {reduxForm} from 'redux-form';
import "tachyons"
import FormContainer from './modules/form/form.container';
import configureStore from './modules/store';
const store = configureStore();
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<Provider store={store}>
<FormContainer />
</Provider>
);
}
}
Have you installed react-redux
on your project yet? 您已经在项目上安装了
react-redux
吗? Does your package.json
file list it under the dependencies? 您的
package.json
文件是否在依赖项下列出了它? If your package.json
lists all of these dependencies, then you'll want to run (from the command line, in the project directly) npm install
. 如果您的
package.json
列出了所有这些依赖项,那么您将要运行npm install
(从命令行,直接在项目中)。
If your package.json
does not have react-redux
and you're trying to add it to your project, then (from the command line, in the project directory) run npm install react-redux --save
. 如果您的
package.json
没有react-redux
而您正尝试将其添加到项目中,那么(从命令行,在项目目录中)运行npm install react-redux --save
。 That command will both add react-redux
to your package.json
AND install the react-redux
package into your node_modules
folder. 该命令将把
react-redux
package.json
添加到您的package.json
,并将react-redux
包安装到node_modules
文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.