npm whitesource未安装
问题描述:
我试图通过npm安装whitesource。我运行以下命令 npm install whitesource --save
npm whitesource未安装
安装后我检查了package.json和whitesource可用。然后我运行以下命令来检查依赖关系是否正确安装。
npm list --depth=0
输出确认whitesource的存在。然后,我导航到node_modules,并找到与bin目录的白色文件夹。
现在,当我尝试运行 whitesource run
我得到的错误: $ whitesource run -bash: whitesource: command not found
任何建议如何调试或解决这个问题?
答
请运行
npm i -g whitesource
您已经安装了WhiteSource包作为项目依赖,而不是作为一个全球性的包。 (这就是“-g”的意思)。
希望这会有所帮助:)