reactjs - ExtReact - npm 错误!403 403 禁止
问题描述
我正在尝试使用 ExtReact 的试用版并使用链接
https://docs.sencha.com/extreact/7.2.0/guides/getting_started/creating_ext_react_app_modern.html
因此,成功获取了用户名和密码,并且能够在第 2 步中登录。
但是在运行第 3 步时:使用 create-react-app 和 ExtReact 模板创建一个 React 应用程序不起作用。以下命令给出以下错误。
npx create-react-app --template @sencha/ext-react-modern ext-react-modern-demo
错误:
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with @sencha/cra-template-ext-react-modern...
npm ERR! code E403
npm ERR! 403 403 Forbidden - GET https://npm.sencha.com/@sencha%2fcra-template-ext-react-modern - unregistered users are not allowed to access package @sencha/cra-template-ext-react-modern
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.
解决方案
https://docs.sencha.com/extwebcomponents/7.0.0/guides/open_tooling_npm/npm_help.html
Windows(命令提示符)
- 运行 del %HOMEPATH%.npmrc - 删除存储的 npm 存储库凭据。此位置在您的系统上可能不同。(或手动删除此文件在本地计算机中找到它)
- 运行 npm cache clean --force 或 rmdir /s /q %HOMEPATH%\AppData\Roaming\npm - 清理 npm 包。
- 运行 rmdir /s /q %HOMEPATH%\AppData\Roaming\npm-cache - 通过删除它来清理 npm 缓存。
- 运行 npm login --registry=https://npm.sencha.com --scope=@sencha - 重新登录到存储库。运行 npm install -g @sencha/ext-gen 或 npm install -g @sencha/ext-react-gen
推荐阅读
- javascript - Why I need to use history.back(); twice for cancel button
- graphics - Does Piecewise Bezier curve pass vertical line test?
- upload - Account locked due to 6 failed logins occurred when using expect script to call sftp to upload file
- scala - How to resolve the Flink hadoop utils error?
- lazy-loading - Problem opening RDB file, path not recognized
- azure-web-app-service - VSCode App Service Deploy Failed 2gb zip file limit
- javascript - 焦点离开输入框时如何使用Vue调用API?
- matlab - 如何在 matlab 包中使用静态工厂方法?
- proxy - 带有 Fortinet-Proxy 的 Python 请求最终会违反协议
- powershell - 如何使用 PowerShell 获取 ESXi 版本列表?