Skip to content
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

OpenBSD: node-sass: Command failed #2916

Closed
anon987654321 opened this issue May 5, 2020 · 10 comments
Closed

OpenBSD: node-sass: Command failed #2916

anon987654321 opened this issue May 5, 2020 · 10 comments

Comments

@anon987654321
Copy link

anon987654321 commented May 5, 2020

Anybody know what to do?

% node -v
v12.16.1
% npm -v
6.13.4
% yarn -v
1.22.4
% uname -sr
OpenBSD 6.7
% env
CC=/usr/bin/clang
CXX=/usr/bin/clang++

% yarn add webpack
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.13: The platform "openbsd" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > webpack-dev-server@3.10.3" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "webpack-dev-server > webpack-dev-middleware@3.7.2" has unmet peer dependency "webpack@^4.0.0".
[4/4] Building fresh packages...
[1/2] ⠠ core-js
error /home/dev/tootiefrootie/node_modules/node-sass: Command failed.
Exit code: 127
Command: node scripts/install.js
Arguments:
Directory: /home/dev/tootiefrootie/node_modules/node-sass
Output:
/tmp/yarn--1588753582434-0.8689804385745683/node[3]: /tmp/yarn--1588753582434-0.8689804385745683/../node: not found

% cd /home/dev/tootiefrootie/node_modules/node-sass
% node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.13.1/openbsd-x64-72_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.13.1/openbsd-x64-72_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
      try setting a proxy via HTTP_PROXY, e.g.

      export HTTP_PROXY=http://example.com:1234

or configure npm proxy via

      npm config set proxy http://example.com:8080

Thanks.

@xzyfer
Copy link
Contributor

xzyfer commented May 5, 2020

The issue is with core-js

@anon987654321
Copy link
Author

@xzyfer seems to be trying to download a non-existing node-sass file though? Any idea what to do?

@xzyfer
Copy link
Contributor

xzyfer commented May 6, 2020

Take a look at the very first line of the readme

@anon987654321
Copy link
Author

anon987654321 commented May 6, 2020

@xzyfer what do you mean by that? That it's due to v4.14.1? That OpenBSD is not in the list of supported OSes?

@anon987654321
Copy link
Author

A bit odd, by the way, that you support FreeBSD and not OpenBSD. These days FreeBSD is on life support.

Choose OpenBSD for your Unix needs. OpenBSD -- the world's simplest and most secure Unix-like OS. Creator of the world's simplest and most secure webserver httpd/TLS & crypto stack LibreSSL/SSH implementation OpenSSH/firewall pf/mail server OpenSMTPD and much, much more. OpenBSD -- the cleanest kernel, the cleanest userland and the cleanest configuration syntax.

@xzyfer
Copy link
Contributor

xzyfer commented May 6, 2020

Correct. Openbsd is not supported. The download will fail as expected but npm will try to compile the binary locally if you have the tool chain

@anon987654321 anon987654321 changed the title node-sass: Command failed: node -e "try{require('./postinstall')}catch(e){}" OpenBSD: node-sass: Command failed May 6, 2020
@anon987654321
Copy link
Author

@xzyfer any chance you could give some more pointers? It doesn't seem to be making it as far as to the local compile part.

The usual "but it used to work just fine a couple of months ago" also hold true in this case :)

@xzyfer
Copy link
Contributor

xzyfer commented May 6, 2020

I see no reason from the information provided why this would have ever worked, or why it would have recently stopped working.

@anon987654321
Copy link
Author

Thanks, guess I'm in for the deep dive. I'll report back on my findings.

@anon987654321
Copy link
Author

The fix is here: https://marc.info/?l=openbsd-ports&m=160657052927238

ln -s /usr/local/bin/node /tmp/node

Don't forget to replace gcc with clang:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

Shoutout to Solene for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants