-
Notifications
You must be signed in to change notification settings - Fork 208
not building with nodejs 12 #177
Comments
node expat is updated, so it is straightforward to upgrade |
@bugvish and @psemme is released and supports NodeJs v12 xmppo/node-expat#195 (comment) is it possible to upgrade the node-expat package? |
the merge is done, now just waiting fro the npm publish on this package. |
Migrated away to https://www.npmjs.com/package/xml-js. |
that is a bit slower :) i wait until they publish, there is a temporary package that is same api and is c based. |
i am open to merge any pull request. I fixed it an named it as p3x-xml2json and it works with Nodejs 12. |
Didn't notice any significant performance degradation. |
well the package you are talking about is NodeJs based and xml2json is C based, so you know it is faster 100%. but it is just a choice or style, just commenting... :) |
@p3x-robot I am having a problem running my node app, even though I switched to using
It's exactly the same error I get when using |
delete the node modules and npm install again, it will work, but with p3x-xml2json |
@p3x-robot except that it doesn't :-/ of course, I already had deleted node modules and did npm install again... with the p3x fork... same error. package.json:
metno.js:
|
the error is : somewhere the code is node modules is compiled with an older version of NodeJs. the exact error: So you not deleted some node_modules folder properly. look there are no problems at all:
|
rm -rf /root/workspace/metno/node_modules
cd /root/workspace/metno/
npm install --allow-root
# after that try this as well
npm rebuild usually it works, but the bug is not in the package but, somewhere in your path. |
That's exactly what I have been doing. It's weird... I have literally no other node_modules in the path. There is just one node js file, one package.json, and the only dependencies are the ones I posted above. The error still happens. |
Note... there are no problems doing npm install or npm rebuild... the error only happens when I run the node app. |
There is a bit of the error just before that I posted above:
i.e. the full error when I run the app is:
|
try this: npm cache --force the try installing again |
sorry: npm cache clean --force |
yes i can see the error:
|
somewhere there is node_expat built with NODE_MODULE_VERSION 64 and now you are on NODE_MODULE_VERSION 72.... |
Nope still get the error after cache clean. Apart from xml2json I am literally only use express and lodash, and those apparently don't depend on node-expat. I'm really confused. Do you know what the bindings error means?
|
OK update... I'm using a Cloud9 IDE and usually for convenience I just hit RUN in the IDE (with the js code file open). It has always worked that way, just fine. If I run the node app direclty from the CLI And furthermore, if I revert to using plain xml2json (not your fork) and re-install modules, and run from the CLI (not the IDE), it runs fine. What is going on? |
you are mixing the nodejs versions. you have an older version of nodejs somehwhere as wll. |
|
you said: the error only happens when I run the node app. |
try the app from the terminal: |
it is in the IDE |
The IDE is using an older version of nodejs then? I'll see if I can find older version of node... |
what Cloud IDE you are using is not using latest NodeJs 12.... that is the error. |
either you can use xml2json (v10) with older version, or if you want LTS you can use p3x-xml2json (v12) that is all. |
OK it's confusing... I had used nvm to install node 12, and
then running the node app via Cloud9 "run" button works... even works with stock xml2json not p3x-xml2json?? |
you are running Cloud9 nodejs v10, xml2json works with v10, but not for the future and not for the lts nodejs v12... figure... |
xml2json does not work with node v12, that is what this issue is about. |
please create a new issue about cloud9, as the error is not about xml2json on nodejs v12 |
But look if I run this from the command line:
must be using node v 12.13.0 when running the metno.js app, because that's what it says? |
it's not an old version |
|
seems fix merged, but latest version not published. so lib still not working on 12 |
I just published version 0.12.0 from master. |
Apologies for the delay, I had personal things that kept me away from OSS work. |
it is related to:
xmppo/node-expat#196
and
xmppo/node-expat#195
The text was updated successfully, but these errors were encountered: