swup / cli

Create swup plugins and themes in seconds, or validate your website 🚤

Home Page:https://swup.js.org/cli

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm install @swup/cli fails at node-gyp rebuild

hirasso opened this issue · comments

Describe your issue:
Hi there! Just wanted to take the CLI for a spin, but I can't install it. When I run npm install @swup/cli, either globally or locally, I always get this error:

npm ERR! code 1
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
[...more verbose stuff...]

My node version is v14.18.1 and the current package.json of node-gyp looks like it should be compatible. Maybe there is an outdated package in the swup cli dependencies that causes the issue? There are quite a few deprecated warnings before the error occurs:

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated hoek@5.0.4: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@4.2.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated joi@13.7.0: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
npm WARN deprecated puppeteer@3.3.0: Version no longer supported. Upgrade to @latest

Before creating this issue, did you think of...:

  • Have you checked closed issues for similar/related problems.
  • Have you provided all helpful information available?

I saw that there are quite a few version bump pull requests waiting to be merged, maybe this already would solve this issue?

Can confirm the install is failing. This seems to be an issue with the xml parser in use, node-xml2json. Switching to another parser like xml-js might help.

@hirasso For some reason, it now works fine on my laptop while it recently failed on my desktop machine. Both running MacOS, but on different versions. What OS are you on?

$ swup -v
@swup/cli/4.0.3 darwin-x64 node-v14.17.6

Thanks for trying it again! You motivated me to dig a little deeper. I'm also on a MAC, with MAMP installed. I noticed that libtool was having trouble. Following the advice found here, I copied over the libtool binary from /usr/bin over to /Applications/MAMP/Library/bin, overwriting the version in there.

After that the CLI installed without Errors! 🎉

$ swup -v
@swup/cli/4.0.3 darwin-x64 node-v14.18.1