3

我正在尝试使用 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.
4

1 回答 1

3

https://docs.sencha.com/extwebcomponents/7.0.0/guides/open_tooling_npm/npm_help.html

Windows(命令提示符)

  1. 运行 del %HOMEPATH%.npmrc - 删除存储的 npm 存储库凭据。此位置在您的系统上可能不同。(或手动删除此文件在本地计算机中找到它)
  2. 运行 npm cache clean --force 或 rmdir /s /q %HOMEPATH%\AppData\Roaming\npm - 清理 npm 包。
  3. 运行 rmdir /s /q %HOMEPATH%\AppData\Roaming\npm-cache - 通过删除它来清理 npm 缓存。
  4. 运行 npm login --registry=https://npm.sencha.com --scope=@sencha - 重新登录到存储库。运行 npm install -g @sencha/ext-gen 或 npm install -g @sencha/ext-react-gen
于 2020-08-04T06:40:48.977 回答