npm install compound Fails With "TypeError: Cannot Call Method 'filter' of Undefined"

StackOverflow https://stackoverflow.com/questions/22449977

  •  15-06-2023
  •  | 
  •  

Question

I tried to install compound.js for Cozy, but I got an error that it could not call method 'filter' of undefined.

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 ]

System Info:

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

EDIT: It appears to be a problem with compound versions after 1.1.7-9.

Was it helpful?

Solution

Had the same error, so I tried:

npm update -g

After that, I was able to successfully

npm install compound -g

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top