regexr icon indicating copy to clipboard operation
regexr copied to clipboard

Cannot build regexr on a Debian system

Open Ailothaen opened this issue 4 years ago • 4 comments

Hello,

I have been trying to install regexr on a local webserver, but as someone who only touched a bit node.js some years ago, I am somewhat lost. I do not really understand what I am supposed to do to make a release work, apart that I am supposed to run npm install at some point and use gulp to build the package.

Could someone edit the readme file to add more detailed packaging/installation instructions? (and also specifying all the dependencies required)

Thank you!

Ailothaen avatar May 18 '20 16:05 Ailothaen

Update:

I tried to build a local installation of regexr on a Debian 10 server, after someone helped me with the build process:

Here is the steps that I realized:

  • Installed node.js v14 through this method: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-debian-10
  • Ran npm install --global gulp-cli
  • Downloaded the latest release, pushed it to the server, unzipped it, made a cd in the base directory
  • Ran npm install

However, at this point, the process breaks, seemingly because of something related with node-sass.

> [email protected] install /opt/regexr-3.6.1/node_modules/node-sass
> node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-83_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/linux-x64-83_binding.node": 

HTTP error 404 Not Found

[...]

In file included from /root/.node-gyp/14.3.0/include/node/node.h:67,
                 from ../../nan/nan.h:49,
                 from ../src/binding.cpp:1:
/root/.node-gyp/14.3.0/include/node/v8.h:3639:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                     ^~~
/root/.node-gyp/14.3.0/include/node/v8.h:3639:37: note:   candidate expects 3 arguments, 2 provided
/root/.node-gyp/14.3.0/include/node/v8.h:3642:37: note: candidate: ‘v8::Maybe<bool> v8::Object::Set(v8::Local<v8::Context>, uint32_t, v8::Local<v8::Value>)’
   V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                     ^~~
/root/.node-gyp/14.3.0/include/node/v8.h:3642:37: note:   candidate expects 3 arguments, 2 provided
make: *** [binding.target.mk:125: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/opt/regexr-3.6.1/node_modules/node-sass/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/regexr-3.6.1/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.19.0-6-amd64
gyp ERR! command "/usr/bin/node" "/opt/regexr-3.6.1/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /opt/regexr-3.6.1/node_modules/node-sass
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed with error code: 1
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I attach the full log file. (A friend who tried to install the full app on Windows apparently did not have any issues)

I'm looking forward to someone who could help me at installing regexr.

Thanks in advance! install.log

Ailothaen avatar May 25 '20 13:05 Ailothaen

I know this is old but I Was able to avoid building from source by using node lts/dubnium (v10.24.1)

FoxxMD avatar Jan 13 '22 18:01 FoxxMD

I'm facing the same issue on macOS

0xAtlxolotlz avatar Jan 29 '22 19:01 0xAtlxolotlz