我有一個MERN 網站,在 Github 存盤庫中有 2 個檔案夾,client并且backend. 當我打開反應服務器時,輸出頁面顯示錯誤為
Failed to compile
./src/components/Student/Student.jsx
Module not found: Can't resolve 'react-avatar' in '/MernCrudApp/client/src/components/Student'
This error occurred during the build time and cannot be dismissed.
要重現此錯誤,請按照以下步驟操作。
- 克隆倉庫
- 進入
backend檔案夾并在終端中寫入npm install然后npm run start,然后進入client檔案夾并分別重復命令。
uj5u.com熱心網友回復:
client你的 's中沒有 'react-avatar' 包package.json。
npm install react-package在這個檔案夾中,你應該很好。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/424034.html
