npm install compound失败,出现“TypeError:无法调用方法'过滤器'未定义”

时间:2014-03-17 08:49:30

标签: npm compoundjs

我尝试为Cozy安装compound.js,但是我收到一个错误,它无法调用方法' filter'未定义的。

170 verbose read json /root/tmp/npm-853/1395045094633-0.8364134922157973/package/package.json
171 silly lockFile 0885f80c-94633-0-8364134922157973-package /root/tmp/npm-853/1395045094633-0.8364134922157973/package
172 verbose from cache /root/tmp/npm-853/1395045094633-0.8364134922157973/package/package.json
173 verbose tar pack [ '/root/.npm/compound/1.1.13-1/package.tgz',
173 verbose tar pack   '/root/tmp/npm-853/1395045094633-0.8364134922157973/package' ]
174 verbose tarball /root/.npm/compound/1.1.13-1/package.tgz
175 verbose folder /root/tmp/npm-853/1395045094633-0.8364134922157973/package
176 silly lockFile e539f088-pm-compound-1-1-13-1-package-tgz /root/.npm/compound/1.1.13-1/package.tgz
177 verbose lock /root/.npm/compound/1.1.13-1/package.tgz /root/.npm/e539f088-pm-compound-1-1-13-1-package-tgz.lock
178 error tar pack Error reading /root/tmp/npm-853/1395045094633-0.8364134922157973/package
179 silly lockFile e539f088-pm-compound-1-1-13-1-package-tgz /root/.npm/compound/1.1.13-1/package.tgz
180 error TypeError: Cannot call method 'filter' of undefined
180 error     at Packer.IgnoreReader.addIgnoreRules (/usr/local/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ign$
180 error     at Packer.IgnoreReader.addIgnoreFile (/usr/local/lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-igno$
180 error     at fs.readFile (fs.js:176:14)
180 error     at fs.close (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:92:5)
180 error     at Object.oncomplete (fs.js:297:15)
181 error If you need help, you may report this log at:
181 error     <http://github.com/isaacs/npm/issues>
181 error or email it to:
181 error     <npm-@googlegroups.com>
182 error System Linux 2.6.32-042stab081.8
183 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "compound"
184 error cwd /root
185 error node -v v0.8.9
186 error npm -v 1.1.61
187 error type non_object_property_call
188 verbose exit [ 1, true ]

系统信息:

Ubuntu 12.04 64bit
node -v v0.8.9
npm -v 1.1.61

编辑:1.1.7-9之后的复合版本似乎存在问题。

1 个答案:

答案 0 :(得分:1)

有同样的错误,所以我试过了:

npm update -g

之后,我成功了

npm install compound -g