reactjs - 安装了故事书,它不会安装错误说 npm 有问题
问题描述
我正在尝试将 storybook 安装到我的 react 应用程序中,但出现以下错误:
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
谁能指出我正确的方向,这可能是什么?
我做了以下事情:
- 创建了一个新的 React 应用程序
- 在 package.json 的脚本下添加了这一行:
"storybook": "start-storybook -p 9001"
- 跑了
npx -p @storybook/cli sb init
解决方案
推荐阅读
- jupyter-notebook - Jupyter 前端扩展 JavaScript API 的文档在哪里?
- android - 我想知道如何在 ANDROID 中制作我的 BUTTON START 动画
- python - 如何在(仅有点)有序列表中查找元素序列
- c++ - 如何在 gcc 4.4 中检查两个 unordered_map 实例是否相等?
- visual-studio - 如何使用 Nuget CLI 重现 VS2017 包管理器命令“Update-Package -reinstall”
- php - 通过 PHP 将值插入 SQL
- javascript - 更改选择框的选定值并提交表单 - 在 IE 中不起作用
- python - Django Rest 中的 ModelSerializer 无法识别模型
- php - Woocommerce 购物车项目在 function.php 中不起作用
- r - 在 R 中使用 keras 包进行 L1 和 L2 正则化?