This repository has been archived by the owner on Mar 31, 2021. It is now read-only.
npm install still not possible #234
Comments
hi, are you use the a command "npm install mxgraph" to install mxgraph ? |
@Thj007 yes |
I should add, my project use the react |
@Thj007 if i understand you correctly, that is the reason why I have opened this issue. The published npm package of |
ok |
I am getting the same problem, any solutions or not yet? |
Try
|
try this module.exports = {
module:{
rules:[{
test: resolve('node_modules/mxgraph/javascript/mxClient.js'),
loader: 'exports-loader?' + [
'mxClient',
// editor
'mxEditor', 'mxDefaultToolbar', 'mxDefaultPopupMenu', 'mxDefaultKeyHandler',
// handler
'mxCellHighlight', 'mxCellMarker', 'mxCellTracker', 'mxConnectionHandler', 'mxConstraintHandler', 'mxEdgeHandler', 'mxEdgeSegmentHandler', 'mxElbowEdgeHandler', 'mxGraphHandler', 'mxHandle', 'mxKeyHandler', 'mxPanningHandler', 'mxPopupMenuHandler', 'mxRubberband', 'mxSelectionCellsHandler', 'mxTooltipHandler', 'mxVertexHandler',
// io
'mxCodec', 'mxCodecRegistry',
// layout
'mxCircleLayout', 'mxCompactTreeLayout', 'mxCompositeLayout', 'mxEdgeLabelLayout', 'mxFastOrganicLayout', 'mxGraphLayout', 'mxParallelEdgeLayout', 'mxPartitionLayout', 'mxRadialTreeLayout', 'mxStackLayout',
'mxHierarchicalLayout', 'mxSwimlaneLayout',
'mxGraphAbstractHierarchyCell', 'mxGraphHierarchyEdge', 'mxGraphHierarchyModel', 'mxGraphHierarchyNode', 'mxSwimlaneModel',
'mxCoordinateAssignment', 'mxHierarchicalLayoutStage', 'mxMedianHybridCrossingReduction', 'mxMinimumCycleRemover', 'mxSwimlaneOrdering',
// model
'mxCell', 'mxCellPath', 'mxGeometry', 'mxGraphModel',
// shapes
'mxActor', 'mxArrow', 'mxArrowConnector', 'mxCloud', 'mxConnector', 'mxCylinder', 'mxDoubleEllipse', 'mxEllipse', 'mxHexagon', 'mxImageShape',
'mxLabel', 'mxLine', 'mxMarker', 'mxPolyline', 'mxRectangleShape', 'mxRhombus', 'mxShape', 'mxStencil', 'mxStencilRegistry', 'mxSwimlane', 'mxText', 'mxTriangle',
// util
'mxAbstractCanvas2D', 'mxAnimation', 'mxAutoSaveManager', 'mxClipboard', 'mxConstants', 'mxDictionary', 'mxDivResizer', 'mxDragSource', 'mxEffects', 'mxEvent', 'mxEventObject', 'mxEventSource', 'mxForm', 'mxGuide', 'mxImage', 'mxImageBundle', 'mxImageExport', 'mxLog', 'mxMorphing', 'mxMouseEvent', 'mxObjectIdentity', 'mxPanningManager', 'mxPoint', 'mxPopupMenu', 'mxRectangle', 'mxResources', 'mxSvgCanvas2D', 'mxToolbar', 'mxUndoableEdit', 'mxUndoManager', 'mxUrlConverter', 'mxUtils', 'mxVmlCanvas2D', 'mxWindow', 'mxXmlCanvas2D', 'mxXmlRequest',
// view
'mxCellEditor', 'mxCellOverlay', 'mxCellRenderer', 'mxCellState', 'mxCellStatePreview', 'mxConnectionConstraint', 'mxEdgeStyle', 'mxGraph', 'mxGraphSelectionModel', 'mxGraphView', 'mxLayoutManager', 'mxMultiplicity', 'mxOutline', 'mxPerimeter', 'mxPrintPreview', 'mxStyleRegistry', 'mxStylesheet', 'mxSwimlaneManager', 'mxTemporaryCellStates'
].join(','),
}]
}
} components import {
mxGraph,
mxUtils,
mxStencilRegistry,
mxConstants,
mxStencil,
mxGraphModel,
} from 'mxgraph/javascript/mxClient'; |
Seems like the way to handle is now
|
Thanks @johnwheeler that helped.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In mxGraph 3.9.8 it is still not possible to install it via
npm install
.The file
"main": "./javascript/dist/build.js",
described in package.json doesn't exist in the uploaded npm package.WIth that issue an import is impossible within the browser
throws an error that
mxgraph
is undefinedThe text was updated successfully, but these errors were encountered: