LoginSignup
0
0

More than 5 years have passed since last update.

Installing Truffle(Memo)

Posted at

I was really stuck to install Truffle. Speaking more, I could completely install Truffle however it did not work at all with obtaining this error:

command not found: truffle .

I thought that the pass is missing somehow.

Measure

Step 1

To confirm the directly pass of npm.
It would be probably popped up /usr/local with execution of npm config get prefix.

Step 2

to change the default directly of npm to another one.
I made a directly for global install
mkdir ~/.npm-global

Setting to use a new directly with npm
npm config set prefix '~/.npm-global'

Open or create a ~/.profile and add below,
export PATH=~/.npm-global/bin:$PATH

Issue

I could not make it with execution above and I obtained same error again.

command not found: truffle .

Solution

It worked correctly with sudo install beta version.
After just uninstall all of package which I have installed and executed below
sudo npm install -g truffle@beta

I have already amended the global install directly then, I must make it back to initial setting.

npm config set prefix '/usr/local'

It should be checked whether it corrected just in case.
npm config get prefix.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0