crubier / react-graph-vis

A react component to render nice graphs using vis.js
http://crubier.github.io/react-graph-vis/
MIT License
946 stars 170 forks source link

how to run it on windows #128

Closed SeekPoint closed 1 year ago

SeekPoint commented 2 years ago

\react-graph-vis\example> npm run build

react-graph-vis-gh-pages@1.0.1 build ./node_modules/.bin/webpack

. is not an internal command

SeekPoint commented 2 years ago

in WSL:

nt/c/ghjs/react-graph-vis/example$ npm run build

react-graph-vis-gh-pages@1.0.1 build ./node_modules/.bin/webpack

[webpack-cli] Failed to load '/mnt/c/ghjs/react-graph-vis/example/webpack.config.js' config [webpack-cli] TypeError: webpack.optimize.UglifyJsPlugin is not a constructor at Object. (/mnt/c/ghjs/react-graph-vis/example/webpack.config.js:43:5) at Module._compile (node:internal/modules/cjs/loader:1103:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at WebpackCLI.tryRequireThenImport (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:244:16) at loadConfigByPath (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:1712:30) at WebpackCLI.loadConfig (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:1832:36) at WebpackCLI.createCompiler (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:2187:29) at WebpackCLI.runWebpack (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:2323:27) at Command. (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/lib/webpack-cli.js:1060:24) at Command.listener [as _actionHandler] (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/node_modules/commander/index.js:922:31) at Command._parseCommand (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/node_modules/commander/index.js:1503:14) at Command._dispatchSubcommand (/mnt/c/ghjs/react-graph-vis/example/node_modules/webpack-cli/node_modules/commander/index.js:1443:18)

sakshampandey-mern commented 1 year ago

did you able to run?