N
N
nickolay19672017-02-07 15:04:38
linux
nickolay1967, 2017-02-07 15:04:38

After installation, the command is not available - what to do?

Hello. I run the following command in the terminal:

npm i knex -g

The installation is successful. After that I execute:
knex migrate:latest

And I get an error:
command not found: knex

Such problems occur very often.
What could it be? How to deal with it? What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2017-02-07
@alcyone

During the execution of the command, the shell looks for an executable file in all directories registered in $ PATH. Check if your variable is correct (echo $PATH). Locate the file with locate or find and try running it with an absolute path (/usr/bin/knex for example). In UNIX, nothing is lost just like that, it is important to understand this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question