Closed ObaidUrRehman closed 7 years ago
It's because the newer webpak config, Webpack 2.x has config changes.
I have the same problem, is there a way to deal with it?
If you are using webpack1.x, there should be no problem. When using webpack2.x, you may try:
$ npm install --ignore-scripts mxgraph $ cd node_modules/mxgraph $ vim Gruntfile.js change line no. 76 - path: "javascript/examples/webpack/dist", + path: path.join(__dirname, "javascript/examples/webpack/dist"), $ ../grunt/bin/grunt build or $ npm run postinstall
Hope @brendonboshell to fix it.
That seems to work with the suggested change. Apparently, this will be fixed to allow relative paths again in 2.3.3 of Webpack...
I get an error when attempting to run this:
$ npm run postinstall
mxgraph@3.7.5 postinstall /Users/Gully/WebstormProjects/kefed.io/node_modules/mxgraph grunt build
Loading "Gruntfile.js" tasks...ERROR
TypeError: Cannot read property 'map' of null Warning: Task "build" not found. Use --force to continue.
Aborted due to warnings. npm ERR! code ELIFECYCLE npm ERR! errno 3 npm ERR! mxgraph@3.7.5 postinstall:
grunt build
npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the mxgraph@3.7.5 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR! ~.npm/_logs/2017-11-07T01_27_16_299Z-debug.log
The debug log has the following error report:
verbose stack Error: mxgraph@3.7.5 postinstall:
grunt build
12 verbose stack Exit status 3 12 verbose stack at EventEmitter.(/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16) 12 verbose stack at emitTwo (events.js:125:13) 12 verbose stack at EventEmitter.emit (events.js:213:7) 12 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 12 verbose stack at emitTwo (events.js:125:13) 12 verbose stack at ChildProcess.emit (events.js:213:7) 12 verbose stack at maybeClose (internal/child_process.js:897:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
mxgraph 3.8.0 fails too. Why would there be a new release that doesn't include a fix for this major problem? The package is pretty much unusable if nobody can install it, right?
npm install mxgraph --save
is failing:node v6.9.1 npm v3.10.8 windows machine
Here is log:
Running "copy:main" (copy) task Copied 141 files
Running "concat:dist" (concat) task
Running "webpack:examples" (webpack) task Warning: Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
Aborted due to warnings. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! Windows_NT 10.0.14393 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "mxgraph" "--save" npm ERR! node v6.9.1 npm ERR! npm v3.10.8 npm ERR! code ELIFECYCLE
npm ERR! mxgraph@3.7.1 postinstall:
grunt build
npm ERR! Exit status 3 npm ERR! npm ERR! Failed at the mxgraph@3.7.1 postinstall script 'grunt build'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the mxgraph package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! grunt build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs mxgraph npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls mxgraph npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! D:\Projects\demo\npm-debug.log