首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >没有获得这样的文件或目录:'ganache-cli‘错误

没有获得这样的文件或目录:'ganache-cli‘错误
EN

Stack Overflow用户
提问于 2022-01-21 16:27:37
回答 1查看 989关注 0票数 2

我使用npm install -g ganache-cli安装了ganache-cli,但是在尝试运行它时遇到了No such file or directory: 'ganache-cli错误。在调用echo $PATH时,我看到了包含ganache文件的~/.npm-global/bin,所以我对这个问题可能是什么感到困惑。任何帮助都是非常感谢的。

作为参考,我在MacOS上使用zsh。

EN

回答 1

Stack Overflow用户

发布于 2022-06-23 12:44:22

加纳奇-克莱伊现在不受欢迎了。您可能会看到以下npm警告:

代码语言:javascript
复制
npm WARN deprecated ganache-cli@6.12.2: ganache-cli is now ganache; visit https://trfl.io/g7 for details

使用npm install -g ganache

如果遇到如下错误,请使用sudo npm install -g ganache

代码语言:javascript
复制
$ npm install -g ganache
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2022-06-23T12_37_16_476Z-debug.log
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70804493

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档