npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

cupcupw-utils

v0.0.11

Published

name: 包名,后续在npm中搜索全靠它

Readme

发布说明

name: 包名,后续在npm中搜索全靠它

version: 版本号,每发布一次npm包就要增加一个版本,每个版本不能重复。

description:描述

main: 本包向外暴露的文件,很重要,一定要和你打包出来的文件名一模一样,我的叫做"dist/index.js"

private: true/false 是否为私有。 一般为false否则只有自己能使用

flies: 暴露的文件夹, 有哪些文件夹提交到npm上面 格式为[ "es", "lib" ]

keywords: npm检索的关键字

author: 作者

license: ISC

peerDependencies: 代表着当前npm包依赖下面这几种环境。

如果是第一次发布包,执行以下命令,然后输入前面注册好的NPM账号,密码和邮箱,将提示创建成功 npm adduser 如果不是第一次发布包,执行以下命令进行登录,同样输入NPM账号,密码和邮箱 npm login 注意:npm adduser成功的时候默认你已经登陆了,所以不需要再进行npm login了

接着先进入项目文件夹下,然后输入以下命令进行发布 npm publish 当终端显示如下面的信息时,就代表版本号为1.0.0(你的package.json中的版本号)的包发布成功啦!前往NPM官网就可以查到你的包

报错 npm ERR! code E403 npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/ghost-watermarkdemo - Forbidden 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, or npm ERR! 403 on a server you do not have access to.

以下几种原因会导致 账号密码错误 (请检查npm官网的账号密码) 包重名 (请检查npm官网上是否有同名项目,名字取决于 package.js 的项目名字段) 网络原因
镜像源问题 新注册的用户邮箱未激活。 登陆你的邮箱去激活(如下)

更新已经发布的包 npm publish 但是每次更新时,必须修改版本号后才能更新,比如将1.0.0修改为1.0.1后才能更新发布。 这里的包版本管理规则都是一样的,采用的是semver(语义化版本),意思就是版本号:大改.中改.小改

从npm上面卸载自己发布的包 npm unpublish --force

npm WARN using --force Recommended protections disabled. -包名@0.1.0 则卸载成功,这时在npm上面就搜索不到了