问题
I am trying to use trial version for ExtReact and using link
https://docs.sencha.com/extreact/7.2.0/guides/getting_started/creating_ext_react_app_modern.html
So, successfully got username and password and able to login as well in Step 2.
But when running Step 3: Create a React application with create-react-app and ExtReact template is not working. The below command is giving below error.
npx create-react-app --template @sencha/ext-react-modern ext-react-modern-demo
Error:
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.
回答1:
https://docs.sencha.com/extwebcomponents/7.0.0/guides/open_tooling_npm/npm_help.html
Windows (Command Prompt)
- Run del %HOMEPATH%.npmrc - removes the stored npm repository credentials. This location may be different on your system.(or manually delete this file finding it in local computer)
- Run npm cache clean --force or rmdir /s /q %HOMEPATH%\AppData\Roaming\npm - clean the npm packages.
- Run rmdir /s /q %HOMEPATH%\AppData\Roaming\npm-cache - clean the npm cache by removing it.
- Run npm login --registry=https://npm.sencha.com --scope=@sencha - log back into the repository. Run npm install -g @sencha/ext-gen or npm install -g @sencha/ext-react-gen
来源:https://stackoverflow.com/questions/63206576/extreact-npm-err-403-403-forbidden