0

I am trying to install storybook to my react app and I am getting the following error:

npx -p @storybook/cli sb init
Unhandled rejection Error: EACCES: permission denied, open '/Users/angelainniss/.npm/_cacache/index-v5/33/e5/eafd5bb0479b018922b7ac494f7089e5941f5d3050e7b4f78e2cb97358c7'

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/myname/.npm/_logs/2020-10-15T15_39_36_166Z-debug.log
Install for @storybook/cli@latest failed with code 1

Can anyone point me in the right direction as to what this may be?

I did the following:

  1. created a new React app
  2. added this line under scripts in the package.json: "storybook": "start-storybook -p 9001"
  3. ran npx -p @storybook/cli sb init
jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Angela Inniss
  • 359
  • 1
  • 2
  • 18
  • pretty straight forward error, and pretty trivial to already find the solution for [by searching](/help/how-to-ask): you're almost certainly hitting [On npm install: Unhandled rejection Error: EACCES: permission denied](https://stackoverflow.com/questions/50639690/on-npm-install-unhandled-rejection-error-eacces-permission-denied) – Mike 'Pomax' Kamermans Oct 15 '20 at 15:49
  • I did search nothing came up, props need to search better, thanks for pointing me in the right direction though – Angela Inniss Oct 15 '20 at 22:52
  • Note that the links that Mike posted no longer work. I'll post a solution if I can find – howard Jul 02 '21 at 16:55

0 Answers0