Giter VIP home page Giter VIP logo

Comments (7)

frederik-b avatar frederik-b commented on August 16, 2024

I think node-waf will never be supported by windows so you need to wait untill there is a node-gyp version

from node-expat.

astro avatar astro commented on August 16, 2024

Any improvement for this with node-expat 1.6.1?

from node-expat.

ukabu avatar ukabu commented on August 16, 2024

I've tried yesterday evening... No luck. After the necessary download of Python, VisualStudioC++ and Expat for Windows, I run a cmd shell with VisualStudo in the path, set the PYTHON environment variable (it seems that requiring that much stuff to link to dynamic libraries is how NodeJS differenciate itself from Ruby and Java ;) ), set the EXPAT_HOME environment variable...

Then I run npm install node-expat and I get an error telling me it can't find expat.h. It seems it doesn't look under the EXPAT_HOME path. I've tried locating expat in a folder with no spaces in it but it makes no difference.

Is there a reason why the Windows expat binary and headers are not included in the node package? I guess this would make it easier to install.

I'll continue to see if I can make it work properly.

from node-expat.

astro avatar astro commented on August 16, 2024

@ukabu Including those files would violate modularity and make maintenance much harder.

from node-expat.

ukabu avatar ukabu commented on August 16, 2024

I made some changes in my fork ukabu/node-expat@b1e98b8 to make it possible to install it with npm on Windows.

To make it work, you still have to install VisualC++ Express, Python 2.7 and Expat. The PYTHON environment variable must be set to the python.exe complete path and EXPAT_HOME to where expat has been installed.

next you npm install git://github.com/ukabu/node-expat.git#easy-npm-install-on-windows (or you can put that as the version for the node-expat dependency in your package) and npm should build it without issues.

If npm can't find git, do : npm config set "git" "C:\path\to-git.exe"

Change the path to the full path where git is installed (you can use "where git" to find out).

Note that I did not verify if the linux and OSX builds still works. This is why I do not create a pull request (I would also like the build to download expat if it's not there, but I'm very green with gyp and not sure if it's a good idea).

One last thing to remember... After you built it, you have to make sure that expat.dll is in 1) c:\windows\system32, 2) your PATH environment variable or 3) copied into node_modules/node-expat/build/Release. Failing to do so will cause an error when you require('node-expat')

from node-expat.

astro avatar astro commented on August 16, 2024

Please give node-expat 2.0.0 a try. Do we need your patch?

from node-expat.

Mirodil avatar Mirodil commented on August 16, 2024

Thank you @astro. It is works.

from node-expat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.