首页 > 解决方案 > 下一个 JS 安装错误:(npm WARN tarball)

问题描述

安装时出现错误Next js

我的节点版本:最新16.13.0。我试过降级节点版本。但这无济于事

目录E:\Main\project

现在,当我npx create-next-app .在终端中执行时。

我收到以下错误消息:

npm WARN tarball tarball data for whatwg-url@https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz (sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for whatwg-url@https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz (sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==) seems to be corrupted. Trying again.
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path C:\Users\Divyanshu sah\AppData\Local\npm-cache\_cacache\content-v2\sha512\59\4b\bb460d43ae833ba10bc659f3a200adb59fbe0683e4f87a55c441890e86dc8b7968891683862d73ca23ff60cc889ef42b7054b9bcc2dc3a60974acb14a37a
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, lstat 'C:\Users\Divyanshu sah\AppData\Local\npm-cache\_cacache\content-v2\sha512\59\4b\bb460d43ae833ba10bc659f3a200adb59fbe0683e4f87a55c441890e86dc8b7968891683862d73ca23ff60cc889ef42b7054b9bcc2dc3a60974acb14a37a'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Divyanshu sah\AppData\Local\npm-cache\_logs\2021-11-12T18_38_56_606Z-debug.log

Aborting installation.
  npm install --save-exact --save react react-dom next has failed.

注意:我也试过这样:npx create-next-app demo但得到相同的错误消息

我现在该怎么办 ?

标签: npmerror-handlingterminalnext.jsnpx

解决方案


推荐阅读