安裝 tui-editor 或 ngx-tui-editor 時發生錯誤

安裝 tui-editor 或 ngx-tui-editor 時發生錯誤

我正在嘗試安裝 toast markdown 編輯器並收到以下錯誤

npm i --save tui-editor
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/sohee-lee7/Squire.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
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\Ramesh Kumar\AppData\Roaming\npm-cache\_logs\2019-05-25T04_19_47_296Z-debug.log

我的 2019-05-25T04_19_47_296Z-debug.log 文件偵錯日誌 提前致謝。

答案1

我解決了我的問題

  1. 安裝git
  2. 在 PATH 環境變數中新增 C:\Program Files\Git\bin C:\Program Files\Git\cmd 的路徑。
  3. 重新啟動計算機

運行命令

npm i --save tui-editor
npm i --save ngx-tui-editor

相關內容