npm ERR 404 npm ERR 404 ‘@vue/[email protected]‘ is not in the npm registry.

事情是这样的,我今天准备安装element ui库,但是键入命令报错了。

于是我在网上找了一堆教程,什么更换npm源等,都无果。

最后我使用以下方法成功解决!

报错问题

  • 首先打开终端,输入如下命令。

    npm i element-ui -S
    
  • 然后出现报错信息。

    npm WARN deprecated [email protected]: core-js@<3.4 
    is no longer maintained and not recommended for usage due to the number of issues. Because of the 
    V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even 
    if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.     
    -v15 not found
    npm ERR! 404
    npm ERR! 404  '@vue/[email protected]' is not in the npm registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    npm ERR! 404 It was specified as a dependency of '@vue/cli-service'
    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 ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\86132\AppData\Roaming\npm-cache\_logs\2022-03-17T05_34_59_509Z-debug.log
    

    在这里插入图片描述

解决方法

  • 于是我删除了整个node_modules。

    整个删掉!

  • 紧接着再输入如下命令。

    npm i element-ui -S
    
  • 安装成功。
    在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43779149/article/details/123548776