【问题标题】:Installing lessc with NPM - UNABLE_TO_VERIFY_LEAF_SIGNATURE使用 NPM 安装 lessc - UNABLE_TO_VERIFY_LEAF_SIGNATURE
【发布时间】:2013-08-12 22:02:59
【问题描述】:

我想安装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

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

【问题讨论】:

    标签: node.js less npm


    【解决方案1】:

    好的,问题很简单:

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

    显示的命令是:

    npm install -g lessc  // lessc nonexisting
    

    而不是

    npm install -g less
    

    现在,使用上面指定的解决方法,它可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-04
      • 2014-05-30
      • 2021-06-05
      相关资源
      最近更新 更多