当前位置:网站首页>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.
边栏推荐
- Is yuancosmos hype? Or the future
- Houdini 笔记
- How to import CAD files into the map new earth and accurately stack them with the image terrain tilt model
- Dao race track is booming. What are the advantages of m-dao?
- Confusing defer, return, named return value, anonymous return value in golang
- Okaleido tiger NFT is about to log in to binance NFT platform, and the era of NFT rights and interests is about to start
- JS problem summary
- How difficult is it to build a digital collection platform?
- 3、 Midway interface security certification
- 4、 Midway integrates swagger and supports JWT bearers
猜你喜欢

【翻译】使用gRPC和REST的微服务架构中的集成挑战

4、 Midway integrates swagger and supports JWT bearers

Musk responded that the brain has been uploaded to the cloud: already did it!

Cyclic multiple scatter

Super complete summary: how to operate files in go language

Web3 traffic aggregation platform starfish OS interprets the "p2e" ecosystem of real business

C language practice questions + Answers:

Move protocol starts with running and builds a healthy ecosystem of sports

0 threshold takes you to know two-point search

面试官:哥们Go语言的读写锁了解多少?
随机推荐
Web3≠NFT? A digital Renaissance?
How to configure env.js in multiple environments in uni app
VGA character display based on FPGA
【一起上水硕系列】一起提前看看July课程
安装软件时提示【An error occurred while trying to create a file in the destination directory: 拒绝访问】的解决方法
Sword finger offer II 024. reverse linked list
Treap
基于FPGA的VGA字符显示
看了纪录片《埃达克岛的海盗宝藏》,想到我国历史上的遗失秘宝
阻塞队列BlockingQueue 源码解析(ArrayBQ和LinkedBQ)
Taking advantage of the momentum, oceanbase promotes the lean growth of digital payment
Precautions for using kettle excel input
【FFH】实时聊天室之WebSocket实战
[FFH] websocket practice of real-time chat room
Data collection solution for forestry survey and patrol inspection
JS built-in method
Realize page return to parent directory based on cookies
Sed add content after a line
林业调查巡检数据采集解决方案
Digital collection =nft? Have you entered the digital collection?