我在Liferay中创建了一个npm-react portlet。当我在portlet中安装react-redux@7.0.3插件时,它可以正常工作。但是,当我导入该插件的组件时,出现类似“ react-redux@7.0.3的package.json中的react-dom缺少版本约束”的错误
下面是我的package.json
{
"dependencies": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.0.3",
"redux": "^4.0.1",
"redux-form": "^8.2.0"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-liferay-project": "1.6.1",
"babel-preset-react": "6.24.1",
"liferay-npm-bundler": "1.6.1",
"liferay-npm-bundler-preset-react": "1.6.1"
},
"main": "js/index.js",
"name": "redux-test",
"scripts": {
"build": "babel --source-maps -d build/resources/main/META-INF/resources src/main/resources/META-INF/resources && liferay-npm-bundler"
},
"version": "1.0.0"
}