mxgraph 3.7.5 js not installing via npm #102
Comments
Hwo did you solve the problem? I'm facing the same on Windows. |
Same problem, would be amazing if you could share your solution. |
I closed this as it was a duplicate of issue #83, sadly the files needed to implement a fix are not in the git hub repo. |
What files are missing? |
I could not locate the Grunt files or package.json, etc that were causing the problem during the npm install. I think @NicCOConnor has a fork that may contain a fix (See #83 ). Could that fix be pulled into the main branch then mxgraph will work via npm at the latest versions? |
I've pushed https://github.com/jgraph/mxgraph/tree/master/etc/build , is that what's needed? |
So I've tried the following: I cloned the repo, copied the build files into the repo base directory, renamed mxgraph-package.json to package.json, edited the @Version@ to be a version number (3.7.6). |
@davidjgraph I think the issue here is that npm is expecting package.json and Gruntfile.js to be in the root in order to install directly from the source. The Gruntfile.js could possibly be in a build folder but I think package.json must stay in the root of the repo. I can update my fork to the latest version and create a pull request. But was unsure how you would feel about adding files to the root of the repo. Still, with this library picking up steam, I think it could be valuable. |
Nigel, yes, they are current files used when we call npm publish in the deploy step. Just looking at the deploy process the Gruntfile and package.json are copied to the staging area root before calling npm publish. We're saying leaving them in the root fixes this problem? That's not a problem in Github. We're not fans of masses in the root folder, but, as you can tell, Github isn't the master repo, we can keep that clean.
I can just remove the last two lines from the deploy script if that's what's needed? |
@davidjgraph so it appears that the Gruntfile.js and package.json are in the root of the npm package
prior to 3.7.2 this folder contained the individual mxGraph files and grunt packaged them into a single distributable. It would appear that in 3.7.3 the Nic |
@davidjgraph is it possible to fold in the code @NicCOConnor has done under #116? It looks like it would get the npm install working again 👍 |
hey @davidjgraph, I see you've taken some steps towards solving these issues with the NPM build, but the published NPM version is still outdated and breaking on install. Could you look into it please? |
I am using macOS Sierra 10.12.6, with node 8.4.0 and npm 5.3.0, when installing mxgraph using:
$npm -S install mxgraph
I get the following error:
I have attached the associated log file too. Nb: I changed the .log to .txt to enable the upload.
2017-09-07T00_20_45_100Z-debug.txt
The text was updated successfully, but these errors were encountered: