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

Couldn't find executable importjsd. #26

Open
arnaudambro opened this issue Mar 23, 2020 · 2 comments
Open

Couldn't find executable importjsd. #26

arnaudambro opened this issue Mar 23, 2020 · 2 comments

Comments

@arnaudambro
Copy link

Hi there,
I did npm install -g import-js, I try to use it in Sublime Text but I always have this error message.

I did put in my settings

{
    "paths": ["/Users/arnaudambro/.npm/lib/node_modules/import-js/bin"]
}

but nothing changes.
Is my setting good ? I did check in the path that there is a bin folder, and there is one.

@markalfred
Copy link

Same here, using asdf as my node version manager.

$ which -a importjs
/Users/markalfred/.asdf/shims/importjs

$ which -a importjsd
/Users/markalfred/.asdf/shims/importjsd
$ echo $PATH
/Users/markalfred/.rbenv/shims /Users/markalfred/.rbenv/bin /Users/markalfred/.asdf/shims /opt/homebrew/opt/asdf/bin /opt/homebrew/bin /opt/homebrew/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/Python/bin /usr/local/Go/bin
>>> os.environ['PATH']
'/Users/markalfred/.rbenv/shims:/Users/markalfred/.rbenv/bin:/Users/markalfred/.asdf/shims:/opt/homebrew/opt/asdf/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Python/bin:/usr/local/Go/bin'

Adding this setting doesn't help

{
  "paths": ["/Users/markalfred/.asdf/shims"]
}

The error is consistently:

error: Couldn't find executable importjsd.

Make sure you have the `importjsd` binary installed (`npm install
import-js -g`).

If it is installed but you still get this message, and you are using
something like nvm or nodenv, you probably need to configure your PATH
correctly. Make sure that the code that sets up your PATH for these
tools is located in .bash_profile, .zprofile, or the equivalent file
for your shell.

Alternatively, you might have to set the `paths` option in your
ImportJS package user settings. Example:

{
    "paths": ["/Users/USERNAME/.nvm/versions/node/v4.4.3/bin"]
}

To see where the importjsd binary is located, run `which importjsd`
from the command line in your project's root.
Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/Lib/python33/sublime_plugin.py", line 1488, in run_
    return self.run(edit, **args)
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js.py", line 53, in run
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js_daemon.py", line 94, in execute_command
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js_daemon.py", line 108, in get_daemon
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js_daemon.py", line 131, in __init__
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js_daemon.py", line 182, in _instantiate_daemon
  File "/Users/markalfred/Library/Application Support/Sublime Text/Installed Packages/ImportJS.sublime-package/import_js_daemon.py", line 160, in _instantiate_daemon
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
FileNotFoundError: [Errno 2] No such file or directory: 'importjsd'

@dev-nes9
Copy link

dev-nes9 commented May 24, 2022

This problem still exists. I found a temporary solution by adding a symbolic link:

ln -s /Users/<user>/.nvm/versions/node/<version>/bin/importjs /Users/<user>/.nvm/versions/node/<version>/bin/importjsd

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

3 participants