./ node_modules / reactstrap / dist / reactstrap.es.js
尝试的导入错误:“ react-lifecycles-compat”不包含默认导出(导入为“ reactLifecyclesCompat”)。
答案 0 :(得分:2)
只需npm install --save reactstrap@6.5.0
就不需要删除任何内容。干杯!
答案 1 :(得分:1)
我现在遇到了相同的错误。我不是专家,但是这对我来说是固定的。
答案 2 :(得分:-1)
private static Map<String, Long> getMapOfElementsOfXML(String xmlContent)
throws ParserConfigurationException, SAXException, IOException {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc1 = db.parse(new ByteArrayInputStream(xmlContent.getBytes()));
NodeList entries = doc1.getElementsByTagName("*");
Map<String, Long> mapElements = new HashMap<>();
for (int i = 0; i < entries.getLength(); i++) {
Element element = (Element) entries.item(i);
if (element.getChildNodes().getLength() == 1&&element.getTextContent()!=null) {
final String elementWithXPathAndValue = getXPath(element.getParentNode())
+ "/"
+ element.getParentNode().getNodeName()
+ "/"
+ element.getTagName()
+ "/"
+ element.getTextContent();
Long countValue = mapElements.get(elementWithXPathAndValue);
if (countValue == null) {
countValue = Long.valueOf(0l);
} else {
++countValue;
}
mapElements.put(elementWithXPathAndValue, countValue);
}
}
return mapElements;
}
static String getXPath(Node node) {
Node parent = node.getParentNode();
if (parent == null) {
return "";
}
return getXPath(parent) + "/" + parent.getNodeName();
}
从以下行中删除./node_modules/reactstrap/dist/reactstrap.es.js
:
reactLifecyclesCompat,
在以下行中将import reactLifecyclesCompat, { polyfill } from 'react-lifecycles-compat';
更改为reactLifecyclesCompat.polyfill
:
polyfill