Comments (7)
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.
Any improvement for this with node-expat 1.6.1?
from node-expat.
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.
@ukabu Including those files would violate modularity and make maintenance much harder.
from node-expat.
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.
Please give node-expat 2.0.0 a try. Do we need your patch?
from node-expat.
Thank you @astro. It is works.
from node-expat.
Related Issues (20)
- Getting error in running a js file using xml2json in windows HOT 6
- Build Fails on Ubuntu 18.04 Node 12.3.1 HOT 9
- Memory leak and incorrect behavior of stop/resume HOT 3
- TypeError when I use it in a vue project! HOT 1
- node-expat cannot be imported in worker threads
- Robustness to control chars
- Node 14 update HOT 4
- Error with Java on Windows Server 12 HOT 1
- Build fails Linux Mint 20.1 Cinnamon HOT 1
- Stop() or Pause() emit "parser suspended" error then close ?
- Travis build is failing for Node.js version 16.13.0
- [CVE-2022-23852] of underlying libexpat HOT 4
- Cannot install on Windows 10 HOT 1
- How to solve 'ERR_DLOPEN_FAILED' with node_expat.node: Exec format error HOT 1
- Could not locate the bindings file node_expat.node [BUG]
- failed in npm install on nodejs 20 HOT 2
- Build failure on node v21.2.0 HOT 1
- Build failure on node v21.6.1 HOT 1
- Empty link?
- Build failure with node 22.2.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-expat.