我下载了nodes.js v0.10.15-Linux86并将其添加到path中,这样它就只能供我使用了。我安装了clean@1.1.3。但是,在安装之后,我在任何地方都找不到它。
npm http GET https://registry.npmjs.org/clean-css
npm http 200 https://registry.npmjs.org/clean-css
npm http GET https://registry.npmjs.org/clean-css/-/clean-css-1.1.3.tgz
npm http 200 https://registry.npmjs.org/clean-css/-/clean-css-1.1.3.tgz
npm http GET https://registry.npmjs.org/commander
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-2.0.0.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-2.0.0.tgz
clean-css@1.1.3 node_modules/clean-css
└── commander@2.0.0我查看了节点/lib/node_node/目录,没有这样的目录命名为“清洁-css”。
你能看到这个装置出了什么问题吗?
谢谢
发布于 2013-10-14 09:41:10
默认情况下,npm只会在本地node_modules文件夹中安装模块。其思想是,您运行的每个模块和项目都可以有其依赖项的独立版本。
如果您想从shell运行npm install -g clean-css (安装全局),请尝试它。
发布于 2017-02-22 16:49:59
根据清洁-css github页面(https://github.com/jakubpawlowicz/clean-css-cli),他们将这些版本分为清洁css和cli。因此,命令行版本可以通过"npm清洁cli -g“安装,然后可以以"cleancss”的形式从shell访问。
https://stackoverflow.com/questions/19357225
复制相似问题