当前位置:网站首页>Publish your own library on NPM
Publish your own library on NPM
2022-07-24 08:53:00 【mr_ cmx】
One 、 register npm account number
Address :https://www.npmjs.com/signup
Two 、 Log in at the command line npm account number
View the current npm Is the warehouse address https://registry.npmjs.org/ , If not, you need to modify the address
# View the current npm Warehouse address
npm config get registry
At present npm The warehouse address is not https://registry.npmjs.org/ To modify
# modify npm Warehouse address
npm config set registry https://registry.npmjs.org/
Sign in npm Warehouse
npm login
enter one user name 、 password 、 mailbox 、 One time password ( Get through email ) Login after
3、 ... and 、 Release
The command line under the package to be published is as follows :
Initialize project
npm init
Release
npm publish

Go to the official website to check your packages And then there is
Four 、 Common mistakes
1、 Package name Already exists
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/xxx - Package name too similar to existing package xxx; try renaming your package to 'xxx' and publishing with 'npm publish --access=public' instead
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.
2、 Naming problem ( There are uppercase letters in the package name )
npm ERR! code E400
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/xxx - "xxx" is invalid for new packages
3、 Duplicate version
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/xxx - You cannot publish over the previously published versions: 1.0.0.
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.
边栏推荐
- Realize page return to parent directory based on cookies
- Wargames bandit (11-20) problem solving essay
- Confusing defer, return, named return value, anonymous return value in golang
- Sed add content after a line
- Shell script backup mongodb database
- Optimization of MySQL paging query
- Okaleido tiger NFT is about to log in to binance NFT platform, and the era of NFT rights and interests is about to start
- How to configure env.js in multiple environments in uni app
- Recursive performance test
- 安装软件时提示【An error occurred while trying to create a file in the destination directory: 拒绝访问】的解决方法
猜你喜欢

Scatter chart - date

Hack the box - Introduction to networking module detailed Chinese tutorial

Redis learning - Introduction to redis and NiO principles
![The solution of [an error occurred while trying to create a file in the destination directory: access denied] is prompted when installing the software](/img/e5/391cc8ffc3b0410831883be9bde320.png)
The solution of [an error occurred while trying to create a file in the destination directory: access denied] is prompted when installing the software

3587. Connected graph (Jilin University postgraduate entrance examination machine test question)

C language practice questions + Answers:

Source code analysis of BlockingQueue (arraybq and linkedbq)

Porting boa server on imx6ull

How difficult is it to build a digital collection platform?

Wargames NATAS (0-10) problem solving essay
随机推荐
Php+spool to realize the shell client of web version
WordPress free theme: document, making reading more convenient
mysql SUBSTRING_ Application of index in business scenarios
Using OpenCV to do a simple face recognition
Usage of volatile keyword in C language
Larave uses sanctum for API authentication
JS built-in method
Route interceptor
RPC调用方如何实现异步调用:CompletableFuture
[emotion] what is "excellent"
C language practice questions + Answers:
Why does the metauniverse need NFT?
On the relationship between C language function name and function pointer
Aquanee: the true meaning of "p2e"
SQL learning
Kotlin学习笔记1——变量、函数
C# 简述里氏替换原则的应用
JQ native write bullet frame mask layer
Unity C tool class arrayhelper
[FFH] openharmony gnawing paper growth plan -- Application of cjson in traditional c/s model