Spacevim: vim-import-js building failed

Created on 6 Sep 2018  ·  7Comments  ·  Source: SpaceVim/SpaceVim

Expected behavior, english is recommend

I get vim-import-js building failed. I believe that this plugin is inside
the js layer. According to its [documentation] (https://github.com/Galooshi/vim-import-js)
it needs the npm import-js dependency, which is already installed in my system.

Environment Information

  • OS: linux
  • vim version: -
  • neovim version: 0.3.1
  • SpaceVim version: 0.9.0-dev
  • SpaceVim status:
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

The reproduce ways from Vim starting (Required!)

Output of the :SPDebugInfo!

SpaceVim debug information

SpaceVim options :

  auto_disable_touchpad = 1
  autocomplete_method = 'deoplete'
  autocomplete_parens = 1
  background = 'dark'
  buffer_index_type = 4
  checkinstall = 1
  colorscheme = 'gruvbox'
  colorscheme_bg = 'dark'
  colorscheme_default = 'desert'
  custom_color_palette = []
  custom_plugins = [['lfilho/cosco.vim', {'name': 'lfilho/cosco.vim', 'merged': 0}], ['epilande/vim-react-snippets', {'name': 'epilande/vim-react-snippets', 'merged': 0}], ['luochen1990/rainbow', {'name': 'luochen1990/rainbow', 'merged': 0}]]
  debug_level = 1
  default_indent = 2
  disabled_plugins = []
  enable_ale = 0
  enable_cursorcolumn = 0
  enable_cursorline = 1
  enable_debug = 0
  enable_googlesuggest = 0
  enable_guicolors = 1
  enable_insert_leader = 1
  enable_javacomplete2_py = 0
  enable_key_frequency = 0
  enable_language_specific_leader = 1
  enable_neocomplcache = 0
  enable_neomake = 1
  enable_os_fileformat_icon = 0
  enable_powerline_fonts = 1
  enable_statusline_display_mode = 0
  enable_statusline_mode = 0
  enable_tabline_filetype_icon = 1
  enable_vimfiler_filetypeicon = 0
  enable_vimfiler_gitstatus = 0
  enable_vimfiler_welcome = 1
  enable_ycm = 0
  error_symbol = '✖'
  expand_tab = 1
  filemanager = 'vimfiler'
  filetype_icons = {}
  force_global_config = 0
  gitcommit_issue_icon = ''
  gitcommit_pr_icon = ''
  github_username = ''
  guifont = ''
  hiddenfileinfo = 1
  hosts_url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts'
  info_symbol = 'ⓘ'
  keep_server_alive = 1
  language = ''
  leader_guide_default_group_name = ''
  leader_guide_flatten = 1
  leader_guide_hspace = 5
  leader_guide_max_size = 0
  leader_guide_position = 'botright'
  leader_guide_run_map_on_popup = 1
  leader_guide_sort_horizontal = 0
  leader_guide_submode_mappings = {'<C-C>': 'win_close'}
  leader_guide_vertical = 0
  lint_on_save = 1
  lint_on_the_fly = 0
  max_column = 120
  plugin_bundle_dir = '/home/isma/.cache/vimfiles/'
  plugin_manager = 'dein'
  plugin_manager_processes = 16
  plugin_name = 'vim-vebugger'
  project_rooter_automatically = 1
  project_rooter_patterns = ['.git/', '_darcs/', '.hg/', '.bzr/', '.svn/', 'package.json']
  realtime_leader_guide = 1
  relativenumber = 1
  search_tools = ['rg', 'ag', 'pt', 'ack', 'grep']
  sidebar_width = 30
  simple_mode = 0
  smartcloseignoreft = ['tagbar', 'vimfiler', 'SpaceVimRunner', 'SpaceVimREPL', 'SpaceVimQuickFix', 'HelpDescribe', 'VebuggerShell', 'VebuggerTerminal', 'SpaceVimTabsManager']
  smartcloseignorewin = ['__Tagbar__', 'vimfiler:default']
  snippet_engine = 'neosnippet'
  src_root = 'E:\sources\'
  statusline_inactive_separator = 'arrow'
  statusline_left_sections = ['winnr', 'filename', 'major mode', 'syntax checking', 'minor mode lighters', 'vcs', 'hunks']
  statusline_right_sections = ['fileformat', 'cursorpos', 'percentage']
  statusline_separator = 'arrow'
  statusline_unicode_symbols = 1
  terminal_cursor_shape = 2
  version = '0.9.0-dev'
  vim_help_language = 'en'
  vimcompatible = 0
  warning_symbol = '⚠'
  wildignore = '*/tmp/*,*.so,*.swp,*.zip,*.class,tags,*.jpg,*.ttf,*.TTF,*.png,*/target/*,.git,.svn,.hg,.DS_Store,*.svg'
  windows_index_type = 0
  windows_leader = 's'
  windows_smartclose = 'q'

SpaceVim layers :

[[layers]]
  name="autocomplete"
  auto-completion-return-key-behavior='complete'
  auto-completion-tab-key-behavior='smart'
[[layers]]
  name="checkers"
[[layers]]
  name="format"
[[layers]]
  name="edit"
[[layers]]
  name="ui"
[[layers]]
  name="core"
[[layers]]
  name="core#banner"
[[layers]]
  name="core#statusline"
[[layers]]
  name="core#tabline"
[[layers]]
  name="shell"
  default_position='bottom'
  default_height=30
[[layers]]
  name="lang#html"
[[layers]]
  name="lang#javascript"
[[layers]]
  name="git"
[[layers]]
  name="github"
[[layers]]
  name="colorscheme"
[[layers]]
  name="VersionControl"
[[layers]]
  name="typescript"
[[layers]]
  name="lang#go"
[[layers]]
  name="fzf"
[[layers]]
  name="lang#markdown"
[[layers]]
  name="debug"

SpaceVim Health checking :

SpaceVim clipboard support check report:
Checking +clipboard:
Failed : to support +clipboard, you need has one of following clipboard tools in your $PATH:
1. xclip
2. xsel
3. pbcopy/pbpaste (Mac OS X)
4. lemonade (for SSH) https://github.com/pocke/lemonade
5. doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
SpaceVim environment check report:
Current progpath: nvim(/usr/bin/nvim)
version: 800
OS: linux
SpaceVim lua support check report:
Checking +lua:
Failed : Known issue, neovim do not support lua now.
SpaceVim python support check report:
Checking +python3:
SUCCEED!
Checking +python:
SUCCEED!

SpaceVim runtime log :

[ SpaceVim ] : logger file  does not exists, only log for current process will be shown!
[ SpaceVim ] [22:02:44] [ Error ] Can not set language to en_US.utf8
[ SpaceVim ] [22:02:44] [ Info ] SpaceVim startup status is: [1, '/home/isma']
[ SpaceVim ] [22:02:44] [ Info ] find config file: /home/isma/.SpaceVim.d/init.toml
[ SpaceVim ] [22:02:44] [ Info ] loadding cached config: /home/isma/.cache/SpaceVim/conf/_home_isma__SpaceVim_d_init_toml.json
[ SpaceVim ] [22:02:44] [ Info ] SpaceVim server startup at:/tmp/spacevim_nvim_server
[ SpaceVim ] [22:02:44] [ Info ] Find project root('.git/',''):/home/isma/.git/
[ SpaceVim ] [22:02:44] [ Info ] change to root:/home/isma
[ SpaceVim ] [22:02:44] [ Info ] try to open SpaceVim welcome page
[ SpaceVim ] [22:02:44] [ Info ] change to root:/home/isma

Screenshots

If you have any screenshots for this issue please upload here. BTW you can use https://asciinema.org/ for recording video in terminal.

Most helpful comment

I have checked the error log, It requires root permission to build, so simply remove the repo dir and restart vim as "sudo vim" let plug manager reinstall import-js and build will success

All 7 comments

you can builde this plugin manually, and to see what happened. on plugin manager buffer, press g f, will open terminal with path of the plugin under cursor.

Does this attempt to use npm to install import-js? It fails to install with npm for me, but i got it installed with yarn. but the build stilled in the vim part.

I had the same error with npm, it stalled refusing to install another library. Yarn works fine

yarn installed it fine, but it still fails to build the vim-import-js

I have checked the error log, It requires root permission to build, so simply remove the repo dir and restart vim as "sudo vim" let plug manager reinstall import-js and build will success

I the resolved in my Debian Buster:

# npm install -g import-js --allow-root --unsafe-perm=true

Optional, only if you has installed nodejs from https://github.com/nodesource/distributions:
# apt purge -y nodejs
# rm /etc/apt/sources.list.d/nodesource.list
# aptitude install node-sqlite3
# apt install npm
# npm install -g import-js --allow-root --unsafe-perm=true

Having the same problem...

importjs command works but vim-import-js building always failed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keai4le picture keai4le  ·  4Comments

gennad picture gennad  ·  4Comments

teemola picture teemola  ·  5Comments

eperfect picture eperfect  ·  4Comments

everettjf picture everettjf  ·  5Comments