2017-08-30 208 views
0

我使用:爲什麼在運行npm install --no-bin-links時存在錯誤?

Laravel 5.4

的Windows 10

節點版本:v6.11.1

NPM版本:5.3.0

如果我運行:npm install --no-bin-links

存在錯誤:

npm WARN deprecated [email protected]: express 2.x series is deprecated 
npm WARN deprecated [email protected]: 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 

我該如何解決這個錯誤?

更新:

卸載節點版本:v6.11.1並安裝新版本,V8.4.0,但它是相同的

回答

0

我不熟悉這個錯誤,但控制檯輸出中明確規定:

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

+0

現在,它的工作原理。我使用:'npm cache clean --force'。看看這個:https://stackoverflow.com/questions/45951131/why-js-and-css-not-load-whereas-compile-asset-laravel-mix-success。我發現了新的問題 –

相關問題