2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
1. First check whether your npm source is an official mirror source. If not, switch to an official mirror source.
- // 官方镜像源
- npm config set registry https://registry.npmjs.org/
-
- // 如更换为淘宝镜像
- npm config set registry https://registry.npm.taobao.org/
2. Register an npm account
npm adduser
You can also go directly to the npm official website to register
3. Use npm login to log in to your account
npm login
After logging in, use npm publish to publish the npm package
npm publish
Publish successful interface
Notice:
The name in package.json cannot be repeated, otherwise the package will fail to be sent and an error 403 will be reported.