slap-editor / slap

Sublime-like terminal-based text editor
MIT License
6.14k stars 216 forks source link

Build fails (Node 10) #408

Open ClementNerma opened 5 years ago

ClementNerma commented 5 years ago

I'm not able to install slap as the build fails when I install it. Here is the installation output:

$ yarn global add slap@latest                                                                                                                                                          !231 yarn global v1.9.4
[1/4] Resolving packages...
warning slap > node-clap > npm > request > node-uuid@1.4.8: Use uuid module instead
warning slap > node-clap > npm > request > hawk > hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
warning slap > node-clap > npm > request > hawk > boom > hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
warning slap > node-clap > npm > request > hawk > sntp > hoek@2.16.3: The major version is no longer supported. Please update to 4.x or newer
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/4] ⠂ marker-index
[2/4] ⠂ runas
[-/4] ⠂ waiting...
error /home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.10.0 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/__myusername/.node-gyp/10.10.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/__myusername/.node-gyp/10.10.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/__myusername/.node-gyp/10.10.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make : on entre dans le répertoire « /home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index/build »
  CXX(target) Release/obj.target/marker_index/src/native/iterator.o
  CXX(target) Release/obj.target/marker_index/src/native/marker-index-wrapper.o
../src/native/marker-index-wrapper.cc: In static member function ‘static bool MarkerIndexWrapper::IsFinite(v8::Local<v8::Integer>)’:
../src/native/marker-index-wrapper.cc:128:92: error: no matching function for call to ‘v8::Object::CallAsFunction(v8::Local<v8::Primitive>, int, v8::Local<v8::Value> [1])’
     Local<Value> result = Nan::New(is_finite_function)->CallAsFunction(Nan::Null(), 1, argv);
                                                                                            ^
In file included from /home/__myusername/.node-gyp/10.10.0/include/node/node.h:63:0,
                 from ../../../../nan/nan.h:52,
                 from ../src/native/marker-index-wrapper.cc:2:
/home/__myusername/.node-gyp/10.10.0/include/node/v8.h:3618:43: note: candidate: v8::MaybeLocal<v8::Value> v8::Object::CallAsFunction(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)
   V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsFunction(Local<Context> context,
                                           ^~~~~~~~~~~~~~
/home/__myusername/.node-gyp/10.10.0/include/node/v8.h:3618:43: note:   candidate expects 4 arguments, 3 provided
marker_index.target.mk:109: recipe for target 'Release/obj.target/marker_index/src/native/marker-index-wrapper.o' failed
make : on quitte le répertoire « /home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index/build »
make: *** [Release/obj.target/marker_index/src/native/marker-index-wrapper.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.4.0-17134-Microsoft
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/__myusername/.config/yarn/global/node_modules/base-widget/node_modules/marker-index
gyp ERR! node -v v10.10.0
ClementNerma commented 5 years ago

Versions :

datdinhquoc commented 5 years ago

I had to fall back to nodejs 6.5.0 (possibly any before 7.0) to install Slap.

Some of my projects are using nodejs latest and switching between old version of nodejs and latest one again and again to use editor isn't a solution.

tomdol commented 5 years ago

Guys, have a look at this https://github.com/slap-editor/slap/issues/405#issuecomment-376469394 perhaps it will help you too.

ClementNerma commented 5 years ago

As you can see in the error message, that's a problem in the C++ source code, not a permission error. Besides, I already configured my NPM to avoid permission errors.

tomdol commented 5 years ago

Right, I missed that. I had a look at slap's dependencies and it looks like they are quite outdated. slap depends on 'base-widget@1.1.0', which depends on 'text-buffer@9.2.7' while the most recent version is 13.14.10. I think it would be possible to perform a local build and use it to install on our machines but I don't know how to force a dependency of slap to use a more recent version of 'text-buffer'. Any ideas?

ClementNerma commented 5 years ago

I updated manually the dependencies from the package.json manually, but that doesn't work. I now have an error with v8-debug.h not found. The problem comes from the v8-debug package, which is present in the node_modules folder when I run yarn install. The problem is that I don't know why this module is installed by Slap, I tried to visualize the dependencies graph with two different tools and no show v8-debug in the result tree...

zeg-io commented 5 years ago

Confirmed. Installed node 7.10.1 and was able to successfully install slap. Is this still being maintained?

JulesGM commented 5 years ago

the last commit was in 2016. it's clear at this point that it's not being maintained.

JulesGM commented 5 years ago

I wish someone would make a fork and maintain it, or be given ownership. (not me)

ghost commented 5 years ago

I've been finding lots of node repos that haven't been touched in 2 or 3 years and are not working according to readme files. seems like it should be easier to have multiple node versions installed - but I guess there is a problem for all the the node*path env vars? too bad this editor looks really cool - I'm not going to downgrade node to try it

MuhammadSawalhy commented 3 years ago

See this issue, I have answered it, #414

ajstrand commented 2 years ago

If anyone is still interesting in this editor, I have a fork that runs under node 16(haven't tried 17).

My plan is maintain the project as open source/update the codebase as i get time.

Personally I like js more than lua/vimscript/emacs, so this editor seemed like nice change of pace.

It also uses less resources than VSCode

JulesGM commented 2 years ago

that's great to hear @ajstrand ! thanks a lot

JulesGM commented 2 years ago

I wonder if the original author is... even alive

ClementNerma commented 2 years ago

I wonder if the original author is... even alive

Well at least they haven't been active on GitHub for the past year.

Toby222 commented 2 years ago

The project (and the author thereof) is very much dead, sadly. cf. this comment