NativeScript / NativeScript/nativescript-cli
Testing broken: webpack 4 vs webpack 3 requirement by karma-webpack 3.0.5
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 1.1k
- Fork
- 204
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 8
Mô tả
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Component nativescript has 7.1.2 version and is up to date.
✔ Component @nativescript/core has 7.1.2 version and is up to date.
✖ Component @nativescript/ios is not installed.
✔ Component @nativescript/android has 7.0.1 version and is up to date
Describe the bug
ns test android fails with this karma error:
ERROR [preprocess]: Can not load "webpack"!
Because webpack 3 can't be installed side by side with webpack 4 (afaik?!). npm install correctly states that the peer dependency for webpack 3 (required by karma-webpack@3.0.5) needs to be installed manually.
"dependencies": {
"@nativescript/core": "~7.1.0",
"@nativescript/theme": "~2.3.0",
"@nativescript/unit-test-runner": "^1.0.2"
},
"devDependencies": {
"@nativescript/android": "7.0.1",
"@nativescript/webpack": "~4.0.0",
"@types/karma-chai": "0.1.2",
"@types/mocha": "8.2.0",
"chai": "4.2.0",
"karma": "6.0.0",
"karma-chai": "0.1.0",
"karma-mocha": "2.0.1",
"karma-nativescript-launcher": "0.4.0",
"karma-webpack": "3.0.5",
"mocha": "8.2.1",
"typescript": "~3.9.0"
},
To Reproduce
ns create karmaissue --template @nativescript/template-blank-ts@7.0.4
cd karmaissue
ns test init --framework mocha
ns test android
Expected behavior
Sample test runs (karma doesn't throw an error)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện sự cố với các lệnh được liệt kê ns create, ns test init --framework mocha và ns test android. Xem xét các yêu cầu của karma-webpack 3.0.5 và @nativescript/webpack 4.0.0; công việc được xem là hoàn tất khi bài kiểm thử mẫu chạy mà không gặp lỗi tiền xử lý webpack.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, webpack
- Lĩnh vực
- cli, testing-qa
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100