Sublime-like terminal-based text editor

Related tags

Command Line slap
Overview

Screenshot

slap 👋 Build Status Donate

slap is a Sublime-like terminal-based text editor that strives to make editing from the terminal easier. It has:

  • first-class mouse support (even over an SSH connection)
  • a Sublime-like file sidebar
  • double-click to select word, highlight other occurrences
  • configurable Sublime-like keybindings* (Ctrl+S save, Ctrl+Z undo, etc.)
  • copying/pasting with OS clipboard support
  • infinite undo/redo
  • syntax highlighting for 100+ languages
  • bracket matching
  • autoindentation
  • heavily customizeable via plugins
  • ... many other features that will make you leave nano, vim, and emacs behind

Installation

$ curl -sL https://raw.githubusercontent.com/slap-editor/slap/master/install.sh | sh

If you already have NodeJS installed:

$ sudo npm install -g slap@latest

Usage

$ slap fish.c
$ slap fish1.c fish2.c
$ slap redfish/ # open dir
$ slap # new file

Default keybindings

  • Quit: Ctrl+Q
  • Movement: mouse or arrow keys and PageUp/Down/Home/End
    • Shift or click+drag to select, Ctrl/Alt to move faster
  • Save: Ctrl+S
  • Undo: Ctrl+Z, redo: Ctrl+Y
  • List open tabs: Ctrl+L
  • Next/previous tab: Ctrl+Alt+PageUp/Down
  • Close tab: Ctrl+W
  • Find: Ctrl+F
  • Go to line: Ctrl+G
  • Go to matching bracket: Ctrl+]
  • Open: Ctrl+O (or click the filebrowser)
  • New file: Ctrl+N

Configuration

slap supports INI or JSON config files. You can put configuration wherever rc can find it. A mostly empty configuration file with some useful comments is created in ~/.slap/config if an existing file isn't found.

Pass configuration via command line:

$ slap --header.style.bg red file.c

Plugins

Slap is fully customizeable and supports plugins written in JS. You can place single JS files, or NodeJS packages, into ~/.slap/plugins/.

To write your own plugin, a good starting point is slap-clipboard-plugin. Please note that plugin packages must have "keywords": ["slap-plugin"] in package.json.

OS support

OSX

iTerm2 supports the mouse and most keybindings out of the box. For optimal Terminal.app usage, see slap-Terminal.app-profile.

Linux

If you are using X.Org, ensure xclip is installed for OS clipboard support.

Windows

Most terminal emulators in Windows do not support mouse events, PuTTY being a notable exception. In Cygwin, slap crashes on startup due to joyent/node#6459.

Issues

Join us in #slap on Freenode for troubleshooting, theme/plugin/core development, or palm strike discussion of any nature.

Some keys don't work!

NOTE: if you are using Terminal.app, see slap-Terminal.app-profile.

Unfortunately most terminal emulators do not support certain keystrokes and as such there is no way to handle them. These include C-backspace, S-home/end, and S-pageup/down. Most of these actions have alternate keybindings, inspired by emacs and other editors, but if you find one that doesn't work, please submit an issue!

Slow on single cores, Raspberry Pi

slap is based on Github's atom/text-buffer, and as such should be very performant, even with very large files.

Try --editor.highlight false or adding the following to ~/.slap/config:

[editor]
highlight = false

If that doesn't improve performance, please run with --perf.profile true and submit an issue with the newly-created v8.log file.

Comments
  • npm install -g slap@latest fails

    npm install -g slap@latest fails

    Trying to install slap using npm install -g slap@latest but it gives me an error message:

    npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
    npm WARN deprecated [email protected]: Version no longer supported. Upgrade to @latest
    /Users/macorifice/.nvm/versions/node/v10.16.3/bin/slap -> /Users/macorifice/.nvm/versions/node/v10.16.3/lib/node_modules/slap/slap.js
    
    > [email protected] install /Users/macorifice/.nvm/versions/node/v10.16.3/lib/node_modules/slap/node_modules/marker-index
    > node-gyp rebuild
    
      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:112:43: warning: 'Int32Value' is deprecated [-Wdeprecated-declarations]
          row = static_cast<unsigned>(js_row->Int32Value());
                                              ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8.h:2478:3: note: 'Int32Value' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
      ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated))
                                ^
    ../src/native/marker-index-wrapper.cc:118:49: warning: 'Int32Value' is deprecated [-Wdeprecated-declarations]
          column = static_cast<unsigned>(js_column->Int32Value());
                                                    ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8.h:2478:3: note: 'Int32Value' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
      ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated))
                                ^
    ../src/native/marker-index-wrapper.cc:128:92: error: too few arguments to function call, expected 4, have 3
        Local<Value> result = Nan::New(is_finite_function)->CallAsFunction(Nan::Null(), 1, argv);
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8.h:3622:3: note: 'CallAsFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsFunction(Local<Context> context,
      ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8config.h:416:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:171:58: warning: 'Uint32Value' is deprecated [-Wdeprecated-declarations]
        return Nan::Just<MarkerId>(static_cast<MarkerId>(id->Uint32Value()));
                                                             ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8.h:2477:3: note: 'Uint32Value' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
      ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated))
                                ^
    ../src/native/marker-index-wrapper.cc:331:46: warning: 'Int32Value' is deprecated [-Wdeprecated-declarations]
        marker_index{static_cast<unsigned>(seed->Int32Value())} {}
                                                 ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8.h:2478:3: note: 'Int32Value' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
      ^
    /Users/macorifice/Library/Caches/node-gyp/10.16.3/include/node/v8config.h:327:29: note: expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated))
                                ^
    4 warnings and 1 error generated.
    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 (/Users/macorifice/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    gyp ERR! System Darwin 20.2.0
    gyp ERR! command "/Users/macorifice/.nvm/versions/node/v10.16.3/bin/node" "/Users/macorifice/.nvm/versions/node/v10.16.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /Users/macorifice/.nvm/versions/node/v10.16.3/lib/node_modules/slap/node_modules/marker-index
    gyp ERR! node -v v10.16.3
    gyp ERR! node-gyp -v v5.1.0
    gyp ERR! not ok
    npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=0.10.0 <7"} (current: {"node":"10.16.3","npm":"6.14.8"})
    npm WARN notsup Not compatible with your version of node/npm: [email protected]
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/macorifice/.npm/_logs/2021-03-08T16_48_51_069Z-debug.log
    
    opened by macorifice 6
  • Can't use npm to install slap

    Can't use npm to install slap

    Trying to install slap using the provided command throws this wonderful error message:

    samkim@Sams-MacBook-Pro-3 ~ % npm install -g slap@latest 
    /usr/local/bin/slap -> /usr/local/lib/node_modules/slap/slap.js
    
    > [email protected] install /usr/local/lib/node_modules/slap/node_modules/marker-index
    > node-gyp rebuild
    
      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:21:172: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(GenerateRandomNumber)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:22:144: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(Insert)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:23:156: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(SetExclusive)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:24:144: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(Delete)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:25:144: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(Splice)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:26:148: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(GetStart)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:27:144: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(GetEnd)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:28:146: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(Compare)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:29:164: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(FindIntersecting)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:30:160: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(FindContaining)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:31:162: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(FindContainedIn)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:32:160: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(FindStartingIn)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:33:156: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(FindEndingIn)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:34:140: error: too few arguments to
          function call, single argument 'context' was not specified
      ...Nan::New<FunctionTemplate>(Dump)->GetFunction());
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:39:98: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
      ...= Nan::To<Object>(Nan::GetCurrentContext()->Global()->Get(number_string)...
                                                               ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:40:96: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
      ...Get(is_finite_string)).ToLocalChecked()));
         ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:46:95: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
      ...= Nan::To<Object>(Nan::GetCurrentContext()->Global()->Get(set_string)).T...
                                                               ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:47:80: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
      ...set_prototype_local = Nan::To<Object>(set_constructor_local->Get(prototy...
                                                                      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:48:79: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
      ...set_add_method_local = Nan::To<Object>(set_prototype_local->Get(add_stri...
                                                                     ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:62:50: error: too few arguments to
          function call, single argument 'context' was not specified
                    constructorTemplate->GetFunction());
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:5995:3: note: 
          'GetFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:96:67: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
        Nan::MaybeLocal<Integer> maybe_row = Nan::To<Integer>(object->Get(Na...
                                                                      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:103:70: warning: 'Get' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
        Nan::MaybeLocal<Integer> maybe_column = Nan::To<Integer>(object->Get(Nan...
                                                                         ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3457:3: note: 
          'Get' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:112:54: error: too few arguments to
          function call, single argument 'context' was not specified
          row = static_cast<unsigned>(js_row->Int32Value());
                                      ~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:2613:3: note: 
          'Int32Value' declared here
      V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:118:60: error: too few arguments to
          function call, single argument 'context' was not specified
          column = static_cast<unsigned>(js_column->Int32Value());
                                         ~~~~~~~~~~~~~~~~~~~~~ ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:2613:3: note: 
          'Int32Value' declared here
      V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:128:92: error: too few arguments to
          function call, expected 4, have 3
      ...= Nan::New(is_finite_function)->CallAsFunction(Nan::Null(), 1, argv);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                     ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3789:3: note: 
          'CallAsFunction' declared here
      V8_WARN_UNUSED_RESULT MaybeLocal<Value> CallAsFunction(Local<Context> context,
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:351:31: note: 
          expanded from macro 'V8_WARN_UNUSED_RESULT'
    #define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                                  ^
    ../src/native/marker-index-wrapper.cc:129:20: error: no matching member function
          for call to 'BooleanValue'
        return result->BooleanValue();
               ~~~~~~~~^~~~~~~~~~~~
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:2603:8: note: 
          candidate function not viable: requires single argument 'isolate', but no
          arguments were provided
      bool BooleanValue(Isolate* isolate) const;
           ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:2606:51: note: 
          candidate function not viable: requires single argument 'context', but no
          arguments were provided
                    V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                      ^
    ../src/native/marker-index-wrapper.cc:134:13: warning: 'Set' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
        result->Set(Nan::New(row_string), Nan::New<Integer>(point.row));
                ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3402:3: note: 
          'Set' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version",
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:135:13: warning: 'Set' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
        result->Set(Nan::New(column_string), Nan::New<Integer>(point.column));
                ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3402:3: note: 
          'Set' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version",
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:157:14: warning: 'Set' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
          range->Set(Nan::New(start_string), PointToJS(pair.second.start));
                 ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3402:3: note: 
          'Set' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version",
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:158:14: warning: 'Set' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
          range->Set(Nan::New(end_string), PointToJS(pair.second.end));
                 ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3402:3: note: 
          'Set' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version",
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    ../src/native/marker-index-wrapper.cc:159:22: warning: 'Set' is deprecated: Use
          maybe version [-Wdeprecated-declarations]
          result_object->Set(Nan::New<Integer>(pair.first), range);
                         ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8.h:3402:3: note: 
          'Set' has been explicitly marked deprecated here
      V8_DEPRECATED("Use maybe version",
      ^
    /Users/samkim/Library/Caches/node-gyp/12.11.1/include/node/v8config.h:311:29: note: 
          expanded from macro 'V8_DEPRECATED'
      declarator __attribute__((deprecated(message)))
                                ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    12 warnings and 20 errors generated.
    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/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
    gyp ERR! System Darwin 19.0.0
    gyp ERR! command "/usr/local/Cellar/node/12.11.1/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /usr/local/lib/node_modules/slap/node_modules/marker-index
    gyp ERR! node -v v12.11.1
    gyp ERR! node-gyp -v v5.0.5
    gyp ERR! not ok 
    npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":">=0.10.0 <7"} (current: {"node":"12.11.1","npm":"6.13.0"})
    npm WARN notsup Not compatible with your version of node/npm: [email protected]
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/samkim/.npm/_logs/2019-11-09T07_50_02_012Z-debug.log
    
    opened by sam-k 3
  • Install Fails

    Install Fails

    $ npm i -g slap@latest

    command fails;

    /home/oytun/.npm-global/bin/slap -> /home/oytun/.npm-global/lib/node_modules/slap/slap.js
    
    > [email protected] install /home/oytun/.npm-global/lib/node_modules/slap/node_modules/marker-index
    > node-gyp rebuild
    
    make: Entering directory '/home/oytun/.npm-global/lib/node_modules/slap/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
    In file included from ../src/native/marker-index-wrapper.cc:2:
    ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
    ../../nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
         , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
                                                                  ^
    ../src/native/marker-index-wrapper.cc: In static member function ‘static Nan::Maybe<Point> MarkerIndexWrapper::PointFromJS(Nan::MaybeLocal<v8::Object>)’:
    ../src/native/marker-index-wrapper.cc:112:54: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           row = static_cast<unsigned>(js_row->Int32Value());
                                                          ^
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/v8.h:26,
                     from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:2572:46: note: declared here
       V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                                  ^~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
    ../src/native/marker-index-wrapper.cc:118:60: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
           column = static_cast<unsigned>(js_column->Int32Value());
                                                                ^
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/v8.h:26,
                     from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:2572:46: note: declared here
       V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                                  ^~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
    ../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/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:3728: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/oytun/.node-gyp/11.9.0/include/node/v8.h:3728:43: note:   candidate expects 4 arguments, 3 provided
    ../src/native/marker-index-wrapper.cc:129:33: warning: ‘bool v8::Value::BooleanValue() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         return result->BooleanValue();
                                     ^
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/v8.h:26,
                     from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:2568:43: note: declared here
       V8_DEPRECATED("Use maybe version", bool BooleanValue() const);
                                               ^~~~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
    ../src/native/marker-index-wrapper.cc: In static member function ‘static Nan::Maybe<unsigned int> MarkerIndexWrapper::MarkerIdFromJS(Nan::MaybeLocal<v8::Integer>)’:
    ../src/native/marker-index-wrapper.cc:171:70: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         return Nan::Just<MarkerId>(static_cast<MarkerId>(id->Uint32Value()));
                                                                          ^
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/v8.h:26,
                     from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:2571:47: note: declared here
       V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
                                                   ^~~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
    ../src/native/marker-index-wrapper.cc: In constructor ‘MarkerIndexWrapper::MarkerIndexWrapper(v8::Local<v8::Number>)’:
    ../src/native/marker-index-wrapper.cc:331:57: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
         marker_index{static_cast<unsigned>(seed->Int32Value())} {}
                                                             ^
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/v8.h:26,
                     from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:2572:46: note: declared here
       V8_DEPRECATED("Use maybe version", int32_t Int32Value() const);
                                                  ^~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
       declarator __attribute__((deprecated(message)))
       ^~~~~~~~~~
    In file included from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    ../src/native/marker-index-wrapper.cc: At global scope:
    /home/oytun/.node-gyp/11.9.0/include/node/node.h:495:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
           (node::addon_register_func) (regfunc),                          \
                                               ^
    /home/oytun/.node-gyp/11.9.0/include/node/node.h:529:3: note: in expansion of macro ‘NODE_MODULE_X’
       NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
       ^~~~~~~~~~~~~
    ../src/native/marker-index-wrapper.cc:348:1: note: in expansion of macro ‘NODE_MODULE’
     NODE_MODULE(marker_index, MarkerIndexWrapper::Init)
     ^~~~~~~~~~~
    In file included from /home/oytun/.node-gyp/11.9.0/include/node/node.h:63,
                     from ../../nan/nan.h:53,
                     from ../src/native/marker-index-wrapper.cc:2:
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
    /home/oytun/.node-gyp/11.9.0/include/node/node_object_wrap.h:85:78:   required from here
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:9707:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                    reinterpret_cast<Callback>(callback), type);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
    ../../nan/nan_object_wrap.h:66:61:   required from here
    /home/oytun/.node-gyp/11.9.0/include/node/v8.h:9707:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
    make: *** [marker_index.target.mk:109: Release/obj.target/marker_index/src/native/marker-index-wrapper.o] Error 1
    make: Leaving directory '/home/oytun/.npm-global/lib/node_modules/slap/node_modules/marker-index/build'
    gyp ERR! build error 
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
    gyp ERR! System Linux 4.20.6-arch1-1-ARCH
    gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /home/oytun/.npm-global/lib/node_modules/slap/node_modules/marker-index
    gyp ERR! node -v v11.9.0
    gyp ERR! node-gyp -v v3.8.0
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/oytun/.npm/_logs/2019-02-08T11_14_40_409Z-debug.log
    

    /home/oytun/.npm/_logs/2019-02-08T11_14_40_409Z-debug.log last lines;

    9016 silly install [email protected]
    9017 info lifecycle [email protected]~install: [email protected]
    9018 verbose lifecycle [email protected]~install: unsafe-perm in lifecycle true
    9019 verbose lifecycle [email protected]~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/oytun/.npm-global/lib/node_modules/slap/node_modules/marker-index/node_modules/.bin:/home/oytun/.npm-global/lib/node_modules/slap/node_modules/.bin:/home/oytun/.npm-global/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/oytun/go/bin:/home/oytun/.config/composer/vendor/bin
    9020 verbose lifecycle [email protected]~install: CWD: /home/oytun/.npm-global/lib/node_modules/slap/node_modules/marker-index
    9021 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
    9022 silly lifecycle [email protected]~install: Returned: code: 1  signal: null
    9023 info lifecycle [email protected]~install: Failed to exec install script
    9024 timing action:install Completed in 2429ms
    9025 verbose unlock done using /home/oytun/.npm/_locks/staging-1ae234b2bda2efa6.lock for /home/oytun/.npm-global/lib/node_modules/.staging
    9026 timing stage:rollbackFailedOptional Completed in 605ms
    9027 timing stage:runTopLevelLifecycles Completed in 8791ms
    9028 verbose stack Error: [email protected] install: `node-gyp rebuild`
    9028 verbose stack Exit status 1
    9028 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
    9028 verbose stack     at EventEmitter.emit (events.js:197:13)
    9028 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    9028 verbose stack     at ChildProcess.emit (events.js:197:13)
    9028 verbose stack     at maybeClose (internal/child_process.js:978:16)
    9028 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
    9029 verbose pkgid [email protected]
    9030 verbose cwd /home/oytun
    9031 verbose Linux 4.20.6-arch1-1-ARCH
    9032 verbose argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "slap@latest"
    9033 verbose node v11.9.0
    9034 verbose npm  v6.7.0
    9035 error code ELIFECYCLE
    9036 error errno 1
    9037 error [email protected] install: `node-gyp rebuild`
    9037 error Exit status 1
    9038 error Failed at the [email protected] install script.
    9038 error This is probably not a problem with npm. There is likely additional logging output above.
    9039 verbose exit [ 1, true ]
    
    opened by oytunistrator 21
  • Feature request: switch to terminal to run command and switch back to editor

    Feature request: switch to terminal to run command and switch back to editor

    On Midnight Commander, we can press Ctrl+O to switch to terminal to run command and Ctrl+O again to switch back.

    On Slap, instead of saving the file and quit to run command, would it be possible to temporarily switch off UI to run command and switch back on?

    opened by datdinhquoc 0
  • Build fails (Node 10)

    Build fails (Node 10)

    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 > [email protected]: Use uuid module instead
    warning slap > node-clap > npm > request > hawk > [email protected]: The major version is no longer supported. Please update to 4.x or newer
    warning slap > node-clap > npm > request > hawk > boom > [email protected]: The major version is no longer supported. Please update to 4.x or newer
    warning slap > node-clap > npm > request > hawk > sntp > [email protected]: 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 [email protected]
    gyp info using [email protected] | 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
    
    opened by ClementNerma 16
Owner
slap
Sublime-like terminal-based text editor
slap
Terminal ui for discord with interactive terminal

dickord why No fucking clue i was bored or something. why does it look dogshit Try and find a node module that supports terminal functions like trauma

Hima 3 Nov 7, 2022
Electronic register based on ClasseViva from terminal

Electronic register based on ClasseViva from terminal. ???? Lived Ăš un registro elettronico collegato direttamente a classeviva. Utilizza i dati espor

usbo 6 Sep 20, 2022
A terminal-to-gif recorder minus the headaches.

ttystudio A terminal-to-gif recorder minus the headaches. Record your terminal and compile it to a GIF or APNG without any external dependencies, bash

Christopher Jeffrey (JJ) 3.2k Dec 23, 2022
rtail(1) - Terminal output to the browser in seconds, using UNIX pipes.

rtail(1) Terminal output to the browser in seconds, using UNIX pipes. rtail is a command line utility that grabs every line in stdin and broadcasts it

Kilian Ciuffolo 1.6k Jan 6, 2023
Pipeable javascript. Quickly filter, map, and reduce from the terminal

Pipeable JavaScript - another utility like sed/awk/wc... but with JS! Quickly filter, map and reduce from the command line. Features a streaming API.

Daniel St. Jules 410 Dec 10, 2022
$2y$10$pCG0Qzwi0AhuaYCFpydbS.c3PHUJGu3AJreDudGce.Zd/UV.HQyLe 262 Nov 21, 2022
Translations with speech synthesis in your terminal as a node package

Normit Normit is an easy way to translate stuff in your terminal. You can check out its Ruby gem version termit. Installation npm install normit -g Us

PaweƂ Urbanek 234 Jan 1, 2023
Terminal recorder: Record your termial session into HTML

terminal-recorder Terminal recorder allows you to record your bash session, and export it to html so then you can share it with your friends. GitHub P

Cristian Cortez 104 Mar 3, 2022
Terminal task list

listr Terminal task list Install $ npm install --save listr Usage const execa = require('execa'); const Listr = require('listr'); const tasks = new

Sam Verschueren 3.1k Jan 3, 2023
📜 Create mutable log lines into the terminal, and give life to your logs!

Because Logging can be pretty and fun Installation $ npm install draftlog What it does It allows you to re-write a line of your log after being writt

Ivan Seidel 1.2k Dec 31, 2022
Display images in the terminal

terminal-image Display images in the terminal Works in any terminal that supports colors. In iTerm, the image will be displayed in full resolution, si

Sindre Sorhus 905 Dec 25, 2022
:rainbow: Beautiful color gradients in terminal output

gradient-string Beautiful color gradients in terminal output Install $ npm i gradient-string Usage const gradient = require('gradient-string'); cons

Boris K 864 Jan 3, 2023
Create clickable links in the terminal

terminal-link Create clickable links in the terminal Install $ npm install terminal-link Usage import terminalLink from 'terminal-link'; const link

Sindre Sorhus 539 Dec 31, 2022
Reliably get the terminal window size

term-size Reliably get the terminal window size Because process.stdout.columns doesn't exist when run non-interactively, for example, in a child proce

Sindre Sorhus 132 Oct 11, 2022
Truncate a string to a specific width in the terminal

cli-truncate Truncate a string to a specific width in the terminal Gracefully handles ANSI escapes. Like a string styled with chalk. It also supports

Sindre Sorhus 78 Oct 10, 2022
Execute shell commands in terminal

Execute shell commands in terminal

skanehira 9 Dec 11, 2021
Add a hungry turtle to your terminal and feed it every time you mistype 'npm' as 'nom'

Nom Does this ever happen to you? You happily code away on a project, navigating the command line like a pro, testing, error logging, installing packa

Meike Hankewicz 5 Apr 26, 2022
Just a minimal library to do some terminal stuff.

Termctl A simple library to do some basic terminal stuff. Usage const termctl = require("termctl"); Note: We have tested this on Linux Mint and Window

Biraj 4 Sep 28, 2021
A terminal for a more modern age

Downloads: Latest release Repositories: Debian/Ubuntu-based, RPM-based Latest nightly build This README is also available in: Korean çź€äœ“äž­æ–‡ Tabby (forme

null 41.8k Dec 30, 2022