Reputation: 49
I am trying to update my project to node 16 but one of the libraries I am using is giving issues. Library name is libxslt
(https://github.com/albanm/node-libxslt). I don't see it is maintained in a while. Is there any alternative library to use? It works with node 12.
My main purpose in using this library is to convert from one form of xml to another using xslt.
const libxslt = require('libxslt');
const styleSheet = libxslt.parse(XSL_RESOURCE);
const transformedXml = await styleSheet.apply(modifiedXml);
The error I am getting is:
7022 error make: *** No rule to make target `Release/obj.target/libexslt/deps/libxslt/libexslt/common.o', needed by `Release/exslt.a'. Stop.
7022 error gyp ERR! build error
7022 error gyp ERR! stack Error: `make` failed with exit code: 2
7022 error gyp ERR! stack at ChildProcess.onExit (/Users/xyz/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
7022 error gyp ERR! stack at ChildProcess.emit (node:events:390:28)
7022 error gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
7022 error gyp ERR! System Darwin 20.6.0
7022 error gyp ERR! command "/Users/xyz/.nvm/versions/node/v16.13.0/bin/node" "/Users/xyz/.nvm/versions/node/v16.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
7022 error gyp ERR! cwd /Users/xyz/workspace/project/node_modules/libxslt
7022 error gyp ERR! node -v v16.13.0
7022 error gyp ERR! node-gyp -v v8.2.0
7022 error gyp ERR! not ok
Thanks
Upvotes: 3
Views: 343