5

我正在尝试在 ubuntu 10.04 上安装咖啡脚本。它永远挂着。这是 npm install coffee-script --verbose 的输出:

npm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli   '/home/deployment/local/node/bin/npm',
npm verb cli   'install',
npm verb cli   'coffee-script',
npm verb cli   '--verbose' ]
npm info using npm@1.0.23
npm info using node@v0.5.4-pre
npm verb config file /home/deployment/.npmrc
npm verb config file /home/deployment/local/node/etc/npmrc
npm verb into /home/deployment [ 'coffee-script' ]
npm verb cache add coffee-script
npm verb cache add [ 'coffee-script', null ]
npm verb parsed url { pathname: 'coffee-script',
npm verb parsed url   href: 'coffee-script' }
npm info addNamed [ 'coffee-script', '' ]
npm verb addNamed [ null, '' ]
npm verb GET coffee-script
npm verb raw, before any munging coffee-script
npm verb url resolving [ 'https://registry.npmjs.org/',
npm verb url resolving   './coffee-script' ]
npm verb url resolved https://registry.npmjs.org/coffee-script
npm verb url parsed { protocol: 'https:',
npm verb url parsed   slashes: true,
npm verb url parsed   host: 'registry.npmjs.org',
npm verb url parsed   hostname: 'registry.npmjs.org',
npm verb url parsed   href: 'https://registry.npmjs.org/coffee-script',
npm verb url parsed   pathname: '/coffee-script' }
npm verb etag "51J8TC2ZNUASOLES8S4M8TNK3"
npm verb response https://registry.npmjs.org/coffee-script
npm verb etag coffee-script from cache
npm verb GET coffee-script/1.1.2
npm verb raw, before any munging coffee-script/1.1.2
npm verb url resolving [ 'https://registry.npmjs.org/',
npm verb url resolving   './coffee-script/1.1.2' ]
npm verb url resolved https://registry.npmjs.org/coffee-script/1.1.2
npm verb url parsed { protocol: 'https:',
npm verb url parsed   slashes: true,
npm verb url parsed   host: 'registry.npmjs.org',
npm verb url parsed   hostname: 'registry.npmjs.org',
npm verb url parsed   href: 'https://registry.npmjs.org/coffee-script/1.1.2',
npm verb url parsed   pathname: '/coffee-script/1.1.2' }
npm verb etag "51J8TC2ZNUASOLES8S4M8TNK3"
npm verb response https://registry.npmjs.org/coffee-script/1.1.2
npm verb etag coffee-script/1.1.2 from cache
npm verb bin dist [ null,
npm verb bin dist   { shasum: 'a530a19d050c37054d83ae6c8041fba0fcd61ed3',
npm verb bin dist     tarball: 'http://registry.npmjs.org/coffee-script/-/coffee-script- 1.1.2.tgz' } ]
npm verb addRemoteTarball [ 'https://registry.npmjs.org/coffee-script/-/coffee-script-1.1.2.tgz',
npm verb addRemoteTarball   'a530a19d050c37054d83ae6c8041fba0fcd61ed3' ]
npm verb mkdir (expected) error ENOENT, No such file or directory '/tmp/npm-1312820932485'
npm verb mkdir (expected) error ENOENT, No such file or directory '/tmp/npm-1312820932485/1312820932485-0.11148986197076738'
npm verb mkdir done: /tmp/npm-1312820932485/1312820932485-0.11148986197076738 755
npm info fetch https://registry.npmjs.org/coffee-script/-/coffee-script-1.1.2.tgz
npm verb fetch to /tmp/npm-1312820932485/1312820932485-0.11148986197076738/tmp.tgz

它似乎永远挂在获取上。当我 wget 该 URL 时,我收到一条消息,表明 http 证书已过期。

有什么建议么??

4

6 回答 6

6

现在你可以做

sudo apt-get install coffeescript
于 2012-08-15T05:02:00.940 回答
4

我有同样的问题。正如您所指出的,这是 ssl 证书的问题。我用了

wget --no-check-certificate https://registry.npmjs.org/coffee-script/-/coffee-script-1.1.2.tgz

然后

npm install -g coffee-script-1.1.2.tgz

于 2011-08-15T11:54:41.677 回答
1

奇数版本的节点被认为是不稳定的。改用 0.4 分支的最新版本,它应该可以工作(昨天对我有用)。

于 2011-08-10T10:00:53.607 回答
0

这几天我也遇到了麻烦。我认为包注册表可能存在问题。

更新:这绝对是一个npm 问题

于 2011-08-09T01:32:48.540 回答
0

旧版本的 Ubuntu 有一个相当过时的 node.js。这些是来自 node.js 的 wiki 的说明(https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os):

获取最新版本的 Node 或在较旧的 Ubuntu 和其他基于 apt 的发行版上安装可能需要一些额外的步骤。安装示例:

sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
于 2014-01-14T06:44:10.923 回答
-1
sudo npm install coffee-script@1.1.2
于 2013-07-04T13:55:06.870 回答