Error while trying to install storybook. Error: EPERM: operation not permitted
See original GitHub issueI 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:
- Create React App using npx create react app
- 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:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
@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
@arun678 no need to thank. Glad that i was able to provide you with some context and you managed to solve the issue.