[英]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>
);
}
}
您已经在项目上安装了react-redux
吗? 您的package.json
文件是否在依赖项下列出了它? 如果您的package.json
列出了所有这些依赖项,那么您将要运行npm install
(从命令行,直接在项目中)。
如果您的package.json
没有react-redux
而您正尝试将其添加到项目中,那么(从命令行,在项目目录中)运行npm install react-redux --save
。 该命令将把react-redux
package.json
添加到您的package.json
,并将react-redux
包安装到node_modules
文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.