npm install -g jasmine error

What I Wanted to Do

To install jasmine

What Happened Instead

Gave me an error saying it is a problem with npm itself and to report this error at npm.community

Reproduction Steps

krnjin@Jins-MacBook-Pro: **~** $ sudo npm install -g jasmine

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/bin'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/lib'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/.github'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/lib/examples'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/lib/filters'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/lib/reporters'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/images'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/images/__pycache__'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-0698c987/tasks'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/jasmine_core.egg-info'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core/example/node_example/lib/jasmine_examples'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core/example/node_example/spec/jasmine_examples'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core/example/spec'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/jasmine-core-5a7b92e7/lib/jasmine-core/example/src'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/concat-map-7b5e6f47/example'

npm WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/concat-map-7b5e6f47/test'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/63/3c'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/49/bd'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/b5/24'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/58/3b'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/89/b4'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/d8/a9'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha1/15/04'

Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/krnjin/.npm/_cacache/content-v2/sha512/c8/91'

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:

npm ERR! <https://npm.community>

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/krnjin/.npm/_logs/2019-03-08T06_08_58_580Z-debug.log

Details

Platform Info

$ npm --versions
{ krnjin: '1.0.0',
  npm: '6.8.0',
  ares: '1.10.1-DEV',
  cldr: '32.0',
  http_parser: '2.8.0',
  icu: '60.1',
  modules: '57',
  napi: '3',
  nghttp2: '1.32.0',
  node: '8.11.4',
  openssl: '1.0.2p',
  tz: '2017c',
  unicode: '10.0',
  uv: '1.19.1',
  v8: '6.2.414.54',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

This is likely to be an open issue with file ownerships and sudo in recent npm. The canonical bug and a possible workaround are:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.