Closed dzielin closed 8 years ago
Not sure what the policy is on double-posts... but this update warrants a separate comment.
I was able to get the basic svg functionality working like before. I created a temp directory. I installed the latest version of using 'npm install -g canvas.' From there, I cloned the repo into the temp directory. I updated the package.json to use the latest version for all dependencies.
Once that was done, I ran npm install to install the dependencies. This got stuck on an infinite loop with a message like:
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/temp/gh-badges/node_modules/gh-badges/node_modules/canvas/.node-gyp/5.8.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/temp/gh-badges/node_modules/gh-badges/node_modules/canvas/.node-gyp"
So, I recursively set the permissions of the node_modules directory to 777. I re-ran npm install and the dependencies were able to finish installing without error. From there, I ran 'npm install -g .' to install gh-badges globally, then removed the temp directory. Worked like a charm!
I haven't done any thorough testing. The mocha tests fail miserably, but I'm able to create my svg badges again, so I'm not too worried about it. Still, this compatibility issue seems like something important to look into.
Thanks for describing your issues. I am glad you found a solution. I am definitely interested in improving the ease of installation by avoiding the use of node-canvas, which causes both your NAN issue and your circular dependency issue.
As a side-note, the gh-badges project has switched location to https://github.com/badges/shields/.
I installed gh-badges a few days ago on a server running Node.js v0.10.25. For that installation, npm was able to complete the install after I did the following things in order:
Unfortunately, after upgrading Node, I'm getting some errors I wasn't getting before:
Since upgrading node, I have removed all existing node_modules and have been reinstalling them manually using npm to ensure they're installed properly with the new version of Node.