-1

i am trying to set up the environment for developing dapps on my mac using https://medium.com/tomochain/how-to-build-a-dapp-on-tomochain-85532a1192e7 tutorial. upon installing truffle, i am unable to use truffle commands from project directories. i think there is some issue with setting up the path variable or truffle not being a global installation. Here is the output from the console

Sheikhs-MacBook-Air:~ Zubair$ node -v v10.15.1

Sheikhs-MacBook-Air:~ Zubair$ npm -v 6.4.1

Sheikhs-MacBook-Air:~ Zubair$ truffle version -bash: truffle: command not found

Sheikhs-MacBook-Air:~ Zubair$ ./node_modules/.bin/truffle version Truffle v5.0.3 (core: 5.0.3) Solidity v0.5.0 (solc-js) Node v10.15.1

Sheikhs-MacBook-Air:~ Zubair$ cd pet-shop-tutorial

Sheikhs-MacBook-Air:pet-shop-tutorial Zubair$ truffle version -bash: truffle: command not found

Sheikhs-MacBook-Air:pet-shop-tutorial Zubair$ ./node_modules/.bin/truffle version -bash: ./node_modules/.bin/truffle: No such file or directory

Sheikhs-MacBook-Air:pet-shop-tutorial Zubair$ npm config get prefix /Users/Zubair/pet-shop-tutorial/~.npm-global

Nguyen Sy Thanh Son
  • 5,300
  • 1
  • 23
  • 33

1 Answers1

1

Turns out it was an issue with the environment path variable. needed to append "/Users/Zubair/~.npm-global/bin/" to the path variable to make truffle accessible from working directories. This answer helped me resolve the issue. https://ethereum.stackexchange.com/questions/52812/error-in-installing-truffle-in-macos