Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
259 views
in Technique[技术] by (71.8m points)

node.js - libxmljs not working with Node 12.19.0 on windows

I am using Node version 12.19.0 and NPM version 6.14.8 on windows. I tried to install latest version and got 0.19.7 and did not face any issue in installation.


E:SSService>npm install libxmljs

> [email protected] install E:SSService
ode_moduleslibxmljs
> node-pre-gyp install --fallback-to-build --loglevel http

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp http GET https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz

node-pre-gyp http 404 https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-v72-win32-x64.tar.gz

node-pre-gyp WARN Tried to download(404): https://github.com/libxmljs/libxmljs/releases/download/v0.19.7/node-
v72-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, unknown) (f
alling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://github.com/libxmljs/libxmljs/releases/download/v
0.19.7/node-v72-win32-x64.tar.gz
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  libxmljs.cc
  xml_attribute.cc
  xml_document.cc
  xml_element.cc
  xml_comment.cc
  xml_namespace.cc
  xml_node.cc
  xml_sax_parser.cc
  xml_syntax_error.cc
E:SSServicenode_moduleslibxmljssrcxml_sax_parser.cc(130): warning C4996: 'Nan::MakeCallback': was declared deprecated [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
  E:SSServicenode_modules
an
an.h(1026): note: see declaration of 'Nan::Make  Callback'xml_text.cc

  xml_pi.cc
  xml_xpath_context.cc
  win_delay_load_hook.cc
  buf.c
  catalog.c
  chvalid.c
  dict.c
E:SSServicenode_moduleslibxmljsvendorlibxmlcatalog.c(984): warning C4013:'open' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
E:SSServicenode_moduleslibxmljsvendorlibxmlcatalog.c(1003): warning C4013: 'close' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
E:SSServicenode_moduleslibxmljsvendorlibxmlcatalog.c(1010): warning C4013: 'read' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
  encoding.c
  entities.c
  error.c
  globals.c
  hash.c
  HTMLparser.c
  HTMLtree.c
  legacy.c
  list.c
  parser.c
  parserInternals.c
  pattern.c
  relaxng.c
  SAX2.c
  SAX.c
  tree.c
  threads.c
  uri.c
  valid.c
  xinclude.c
  xlink.c
  xmlIO.c
  xmlmemory.c
  xmlmodule.c
  xmlreader.c
  xmlregexp.c
E:SSServicenode_moduleslibxmljsvendorlibxmlxmlio.c(733): warning C4013: 'read' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
  xmlsave.c
E:SSServicenode_moduleslibxmljsvendorlibxmlxmlio.c(754): warning C4013: 'write' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
E:SSServicenode_moduleslibxmljsvendorlibxmlxmlio.c(772): warning C4013: 'close' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
E:SSServicenode_moduleslibxmljsvendorlibxmlxmlio.c(3743): warning C4013: 'getcwd' undefined; assuming extern returning int [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
E:SSServicenode_moduleslibxmljsvendorlibxmlxmlio.c(3743): warning C4047: '!=': 'int' differs in levels of indirection from 'void *' [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
  xmlschemas.c
  xmlschemastypes.c
  xmlstring.c
  xmlunicode.c
  xmlwriter.c
  xpath.c
  xpointer.c
     Creating library E:SSService
ode_moduleslibxmljsuildReleasexmljs.lib
   and object E:SSService
ode_moduleslibxmljsuildReleasexmljs.exp
libxmljs.obj : warning LNK4049: locally defined symbol xmlParserVersion imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_node.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_text.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_pi.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_attribute.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_document.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_element.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
xml_comment.obj : warning LNK4049: locally defined symbol xmlFree imported [E:SSService
ode_moduleslibxmljsuildxmljs.vcxproj]
  xmljs.vcxproj -> E:SSService
ode_moduleslibxmljsuildRelease\xmljs.node
npm WARN [email protected] requires a peer of typescript@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","
arch":"any"} (current: {"os":"win32","arch":"x64"})

+ [email protected]
updated 1 package and audited 424 packages in 39.25s

23 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities



However, when i compile my node application to executable, I need to put "xmljs.node" along with my app.exe to make it work. I am getting below error when i am trying to run my app.exe

Error: Module did not self-register: '\?E:SSServicexmljs.node'.
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1248:18)
    at Module.load (internal/modules/cjs/loader.js:1047:32)
    at Function.Module._load (internal/modules/cjs/loader.js:935:14)
    at Module.require (internal/modules/cjs/loader.js:1087:19)
    at Module.require (pkg/prelude/bootstrap.js:1225:31)
    at require (internal/modules/cjs/helpers.js:73:18)
    at bindings (E:snapshotService
ode_modulesindingsindings.js:84:48)
    at Object.<anonymous> (E:snapshotService
ode_moduleslibxmljslibindings.js:1:99)
    at Module._compile (pkg/prelude/bootstrap.js:1320:22)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1218:10)

Similar setup worked for libxmljs version0.19.5 with Node 10x.

I've also tried "npm rebuild" but still issue persist. Is there any other version we should be using with Node 12 on windows? Or, anything i am missing to generate xmljs.node?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...