【问题标题】:Why there exist error when I run npm install --no-bin-links?为什么我运行 npm install --no-bin-links 时会出现错误?
【发布时间】:2017-08-30 00:46:57
【问题描述】:

我用:

Laravel 5.4

Windows 10

节点版本:v6.11.1

Npm 版本:5.3.0

如果我跑步:npm install --no-bin-links

存在错误:

npm WARN deprecated express@2.5.11: express 2.x series is deprecated
npm WARN deprecated connect@1.9.2: connect 1.x series is deprecated
npm ERR! path C:\xampp\htdocs\myshop\node_modules\bs-recipes
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\xampp\htdocs\myshop\node_modules\bs-recipes' -> 'C:\xampp\htdocs\myshop\node_modules\.bs-recipes.DELETE'
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\windows10\AppData\Roaming\npm-cache\_logs\2017-08-30T00_41_20_491Z-debug.log

我该如何解决这个错误?

更新:

我卸载 Node 版本:v6.11.1 并安装新版本 v8.4.0,但还是一样

【问题讨论】:

    标签: node.js laravel npm laravel-5.4 laravel-mix


    【解决方案1】:

    我不熟悉这个错误,但控制台输出清楚地指出:

    npm ERR! enoent ENOENT: no such file or directory, rename 'C:\xampp\htdocs\myshop\node_modules\bs-recipes' -> 'C:\xampp\htdocs\myshop\node_modules\.bs-recipes.DELETE'
    npm ERR! enoent This is related to npm not being able to find a file.
    

    尝试以下方法:

    • 重新启动计算机。
    • 如果您使用的是 Visual Studio 代码,请将其关闭。并通过控制台运行npm install。
    • 如果您使用的是 Visual Studio 代码,请将其更新到最新版本。
    • 在错误中找到该文件并按照错误提示重命名。

    提示:始终阅读错误消息。大多数时候它会告诉你问题到底是什么。

    更新

    尝试在 github 上检查这个类似的问题:npm 17444

    【讨论】:

    猜你喜欢
    • 2017-03-24
    • 2016-12-30
    • 1970-01-01
    • 2020-02-20
    • 1970-01-01
    • 1970-01-01
    • 2022-01-12
    • 2019-07-02
    相关资源
    最近更新 更多