-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpu-features npm install error #365
Comments
Brian McIlwain ***@***.***> writes:
It seems like further down the dependency tree is a not maintained dependency that throws.
ssh2-sftp-client -> ssh2 -> cpu-features (which is optional, not needed, and not maintained) mscdex/ssh2#1083
It is optional, but I don't believe it is reasonable to state it is not
maintained and I don't know if it has advantages for those platforms
where it is supported (i.e. it installs fine under Linux provided you
have the necessary build tools. I think it also builds fine with Intel
based macs. Support for M1 has not yet been added). I'm not familiar
enough with the ssh2 internals to understand precisely how the package
is used, but I'm also confident the author is across the issues and has
good reasons not to remove it.
This causes an error thrown on npm install on macs. Also, my sls deploy fails due to unexpected token error from whatever is
downloaded for the cpu-features package. My current workaround is to rerun npm install --no-optional.
That is odd. I get a warning, not an error, when I install on my mac.
The package installs fine and works without issue for me. What version
of node and npm are you using? What version of macOS? Is it an intel
based mac or M1? I think the dependency will also build successfully on
intel based macs.
Can we get this addressed down the chain and merge it in?
I doubt it. The ssh2 author has been asked to do this in the past and
was not willing to do so. As he points out, this is an optional
dependency. Environments like serverless.com, should not error out when
unable to install optional dependencies - rather, it should issue an
informative warning and complete the install without error. Otherwise,
what is the point of having optional dependencies? I certainly don't
want to do anything at the ssh2-sftp-client level as this will just add
additional maintenance overhead which I don't have time to deal with.
Using the --no-optional switch for NPM is the easiest way to avoid
issues should your build chain not handle the missing optional
dependency or cause it too look like installation has failed.
I've installed and run both ssh2 and ssh2-sftp-client on Linux,
windows10 and macOS Big Sur with no issues and no need to use the
--no-optional switch. Perhaps lambda/serverless is not as forgiving and
you need to add that switch as a configuration option on that platform?
|
Understood. Closing this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems like further down the dependency tree is a not maintained dependency that throws.
ssh2-sftp-client -> ssh2 -> cpu-features (which is optional, not needed, and not maintained) mscdex/ssh2#1083
This causes an error thrown on npm install on macs. Also, my sls deploy fails due to unexpected token error from whatever is downloaded for the cpu-features package. My current workaround is to rerun
npm install --no-optional
.Can we get this addressed down the chain and merge it in?
The text was updated successfully, but these errors were encountered: