gpt4 book ai didi

node.js - 作用域包的 npm 注册表 URL 是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 23:00:07 24 4
gpt4 key购买 nike

npm 有一个底层 API -registry.npmjs.org(等等)。文档在这里 - https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md

如果我想查询一个包裹(例如 express ),则 URL 为 https://registry.npmjs.org/express/ .

但是,如果我想查询作用域包(例如@types/node),我可以在搜索端点( https://registry.npmjs.org/-/v1/search?text=@types/node )中找到它,但是当我点击 https://registry.npmjs.org/@types/node 时我得到了 404。

由于这没有记录,有谁知道公共(public)范围包的 URL 是什么?

最佳答案

对 npm 存储库中的范围包执行 url 编码。

@types/node as @types%2Fnode

确切的网址 https://registry.npmjs.org/@types%2Fnode

关于node.js - 作用域包的 npm 注册表 URL 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50366324/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com