【发布时间】:2021-02-26 15:45:46
【问题描述】:
我正在尝试遵循chainlink "Build, Deploy and Sell Your Own Dynamic NFT" according to the chainlink docs,但是,每当我来迁移松露依赖项时,都找不到 zsh 命令。我在/Users/alexsingleton/.oh-my-zsh 和~/.bash_profile 中都有以下设置:
export PATH=~/.npm-global/bin:$PATH
然而,每当我运行松露迁移(即truffle migrate --reset --network rinkeby)时,终端输出都会报告它为未找到(即zsh: command not found: truffle)。我是否需要在我的 bash-profile 或 oh-my-zsh 配置文件中添加其他参数才能成功运行 truffle 迁移?非常感谢任何指导 - 谢谢!
【问题讨论】:
-
在进行这些编辑后,您是注销并重新登录,还是重新加载启动文件?
-
确认 - 在运行
truffle migrate --reset --network rinkeby之前运行npm install但仍然出现相同的错误:zsh: command not found: truffle。 -
@alexanderjsingleton :由于从错误消息中可以清楚地看出您的 PATH 已损坏,因此您需要在实际运行 truffle 程序的位置检查 PATH。显示 PATH 的
export语句(可以在其他任何位置)并没有真正的帮助。 -
谢谢——这能回答你的问题吗?我正在从以下路径运行松露迁移文件:
/Users/alexsingleton/Desktop/random-nft/dungeons-and-dragons-nft