每次我在视觉工作室上运行这个“npx create-next-app@latest”时,都会出现一个关于我的“注册表”的错误。请问有人可以帮我解决这个问题吗?
npm 错误!代码 ENOTFOUND npm 错误!系统调用 getaddrinfo npm 错误!错误号 ENOTFOUND npm 错误! https://registry.npmjs.org/create-next-app 的网络请求失败,原因:getaddrinfo ENOTFOUND 主机 npm 错误!网络 这是与网络连接相关的问题。 npm 错误!网络 在大多数情况下,您位于代理服务器后面或网络设置错误。 npm 错误!网络 npm 错误!网络 如果您使用代理,请确保 npm 错误!网络“代理”配置设置正确。请参阅:“npm 帮助配置”
我不知道你的问题是否和我的一样,但我在执行时也遇到了与注册表相关的问题
npx next-create-app@latest
我收到如下错误
npm ERR! 404 Not Found - GET https://registry.npmjs.org/creat-next-app - Not found
npm ERR! 404
npm ERR! 404 'creat-next-app@latest' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
我通过删除之前使用下面的命令设置的 npm 包的镜像 url 来解决这个问题。
npm config delete registry
npm config delete disturl