ionic-team / ionic-team/ionic-framework
bug: IONIC REACT VITE SERVER BREAKDOWN
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 50
Mô tả
### Prerequisites
- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
v7.x
### Current Behavior
I have been using Ionic react for sometime now but recently when I run _ionic serve/npm run dev_ in cmd I keep getting errors like "could not load config from vite.config.ts". For a while I had to uninstall node modules and package-lock.json and reinstall them before the vite server is able to run again but it breaks down after I end the session. For now I have tried everything and the server is not working anymore, I discovered even ionic build is also not working. I still do not know what is causing this but I believe the attached screenshot will help

### Expected Behavior
The vite server should be able so serve my app when I run ionic serve or npm run dev
### Steps to Reproduce
1. Open command prompt
2. Change directory to project directory(cd _path_to_project_directory_)
3. Run ionic serve or npm run dev
### Code Reproduction URL
ttps://drive.google.com/drive/folders/1IwzCJS6r1GOj5eD1DjJmjqW9kR4fdeXP?usp=sharing
### Ionic Info
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package.json'
Require stack:
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package.json'
Require stack:
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
- C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic
Ionic:
Ionic CLI : 7.2.0 (C:\Users\HELLO\AppData\Roaming\npm\node_modules\@ionic\cli)
Ionic Framework : @ionic/react 8.4.0
Capacitor:
Capacitor CLI : 6.1.2
@capacitor/android : not installed
@capacitor/core : 6.1.2
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v22.11.0 (C:\Program Files\nodejs\node.exe)
npm : 10.8.2
OS : Windows 10
### Additional Information
All the ionic projects I have previously worked on and is working on are showing this same behavior
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với vite.config.ts đã được báo cáo và tái hiện lỗi bằng ionic serve, npm run dev và ionic build trên Windows 10 với Node.js v22.11.0. Xem xét ảnh chụp màn hình đính kèm và URL tái hiện được liên kết cùng với thông tin chi tiết về phiên bản của Ionic và Capacitor. Công việc được xem là hoàn tất khi xác định được nguyên nhân có thể tái hiện và khôi phục các lệnh máy chủ phát triển và build.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- node.js, react, typescript, vite
- Lĩnh vực
- build-system, frontend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100