question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error while trying to install storybook. Error: EPERM: operation not permitted

See original GitHub issue

I tried installing storybook in my newly created React App, but got this error Error: EPERM: operation not permitted, mkdir ‘C:\Users\XXX’ ‘sb’ is not recognized as an internal or external command, operable program or batch file.

To Reproduce Steps to reproduce the behavior:

  1. Create React App using npx create react app
  2. To Install storybook, use the following command npx -p @storybook/cli sb init --type react_scripts

Package.json* { “name”: “XXX”, “version”: “0.1.0”, “private”: true, “dependencies”: { “@testing-library/jest-dom”: “^4.2.4”, “@testing-library/react”: “^9.5.0”, “@testing-library/user-event”: “^7.2.1”, “react”: “^16.13.1”, “react-dom”: “^16.13.1”, “react-scripts”: “3.4.1” }, “scripts”: { “storybook”: “start-storybook”, “start”: “react-scripts start”, “build”: “react-scripts build”, “test”: “react-scripts test”, “eject”: “react-scripts eject” }, “eslintConfig”: { “extends”: “react-app” }, “browserslist”: { “production”: [ “>0.2%”, “not dead”, “not op_mini all” ], “development”: [ “last 1 chrome version”, “last 1 firefox version”, “last 1 safari version” ] } }

System:* Please paste the results of npx -p @storybook/cli@next sb info here. Error: EPERM: operation not permitted, mkdir ‘C:\Users\XXX’ ‘sb’ is not recognized as an internal or external command, operable program or batch file.

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jonniebigodescommented, Apr 27, 2020

@arun678 i’ve tried it during this weekend as i was triaging a completely different issue. And it worked without a hitch.

Based on the description you have it seems that this could be a permission usage with windows. Or your antivirus acting up. As it might be looking into the folders/files that are being downloaded and it breaks the install.

Can you try installing the cli globally with npm install -g @storybook/cli and initialize it in a new react project created to see if the error pops up?

Because the alternative will be to clean the cache and add them again

0reactions
jonniebigodescommented, May 1, 2020

@arun678 no need to thank. Glad that i was able to provide you with some context and you managed to solve the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm ERR! Error: EPERM: operation not permitted, rename
I got it working when tried npm install with a force option to fetch ... some files & then npm can't update them...
Read more >
Error: EPERM: operation not permit… | Apple Developer Forums
I am installing packages for NODEJS/NPM and am receiving the following error, which, apparently, is not an error with the software, but with...
Read more >
Eperm: Operation not permitted, command not found - YouTube
this error happens when u want to install react for the first time on your system.it will show Eperm operation not permitted and...
Read more >
Npx create-react-app fails with Error: EPERM: operation not ...
Hello: I'm trying to create a new react project using create-react-app: devilbox@php-7.4.19 in /shared/httpd/storybook-01/htdocs $ npx ...
Read more >
How to fix EPERM error while running create-react-app ...
How to fix EPERM error while running create-react-app command ... John Makone you don't need to install npx. Calviղ please read this question...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found