1

-bash: truffle: command not found

Tried installing different versions of npm, node.js, truffle and nothing would work. Is there something wrong with the settings/permissions of my terminal?

3 Answers3

1

Try running this

npx truffle init

0

Try to install Truffle in admin mode and install as global. like: npm install -g truffle This should work fine now.

0

There are two main reasons for this to happen. First, you might not have truffle installed on your computer, if is the case you need to install truffle using the command:

npm install -g truffle

The -g argument is needed for the package to be installed globally.

Second reason may be a misconfigured PATH variable on your computer. Make sure you have the npm global libraries in your PATH.

You can check more info about location of npm global libraries here

thordickinson
  • 51
  • 1
  • 2