node.js - 使用 NPM 安装 lessc - UNABLE_TO_VERIFY_LEAF_SIGNATURE

标签 node.js less npm

我想安装 NPM 提供的 lessc . (在 OSX 上)

首先,我安装了当前版本的 NodeJs:0.10.15。
它包括 NPM。

现在我启动著名的命令:

npm install -g lessc

我得到这个错误:

npm install -g lessc
npm http GET https://registry.npmjs.org/lessc
npm http GET https://registry.npmjs.org/lessc
npm http GET https://registry.npmjs.org/lessc
npm ERR! Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR!     at SecurePair.<anonymous> (tls.js:1350:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:963:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:463:15)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:219:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:209:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR!     at write (_stream_readable.js:573:24)

在网上,我找到了一个 workaround :

npm config set strict-ssl false

但是当我重新启动命令时,我现在得到:

npm install -g lessc
npm http GET https://registry.npmjs.org/lessc
npm http 404 https://registry.npmjs.org/lessc
npm ERR! 404 'lessc' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Darwin 12.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "lessc"
npm ERR! cwd /Users/me
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! code E404

我对 NodeJs 世界及其包装器还很陌生。

我可以做些什么来设法安装 lessc

也许我忘记了一些环境变量。

最佳答案

好的,这个问题很简单:

其实我是受这个启发的 Play plugin .

显示的命令是:

npm install -g lessc  // lessc nonexisting

代替

npm install -g less

现在,使用上面指定的解决方法,就可以了。

关于node.js - 使用 NPM 安装 lessc - UNABLE_TO_VERIFY_LEAF_SIGNATURE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18172661/

相关文章:

javascript - 在javascript中实现递归

html - 我可以使用自定义元素和属性作为有效的 HTML 吗?

less - 重用 LESS 嵌套样式

node.js - VSTS 构建 webpack/NPM 环境配置

node.js - 使用 root 用户的 NPM 安装权限被拒绝错误

node.js - 如何单击此链接进入下一页? [复制]

node.js - MongoDB 不更新双嵌套数组中的子文档(使用 Mongoose FindByIdAndUpdate) - 已知确切位置

javascript - 如何在 intern.js 中使用 setFindTimeout

css - 我怎样才能使这个 LESSCSS 循环正常工作?

npm - Lerna publish 将 gitHead 键添加到 package.jsons