10
npm全局路径前缀
我比以往更加谨慎,因为我npm对过去的行为感到困惑。 我在Mac上,并通过安装的node.js brew install node。 现在,我想jslint.js在命令行中作为命令运行,jslint我发现完成此操作的规范方法是sudo npm install -g jslint成功运行此输出的: $ sudo npm install -g jslint npm http GET https://registry.npmjs.org/jslint npm http 200 https://registry.npmjs.org/jslint npm http GET https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz npm http 200 https://registry.npmjs.org/jslint/-/jslint-0.1.9.tgz npm http GET https://registry.npmjs.org/nopt npm http 200 https://registry.npmjs.org/nopt npm http GET https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz npm http 200 https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz npm http …