NativeScript / NativeScript/nativescript-cli
NativeScript CLI 7.0. and Angular Compiler requires different TypeScript versions
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):
- CLI: 7.0.6
- Cross-platform modules: v7.0.0
- Android Runtime: v7.0.0
- iOS Runtime: v7.0.0
- Plugin(s):
Describe the bug
While updating / migrating my project to v7 typescript will get set to version 3.9.7 to be complaint for v7.
This leads to an issue when starting the application.
splash34$ tns debug android
Searching for devices...
Copying template files...
+ @nativescript/android@7.0.0
updated 1 package and audited 1393 packages in 5.909s
⠇ found 1 high severity vulnerability
run `npm audit fix` to fix them, or `npm audit` for details
Platform android successfully added. v7.0.0
Preparing project...
File change detected. Starting incremental webpack compilation...
webpack is watching the files…
Hash: 2082db08eadcf65243cc
Version: webpack 4.44.1
Time: 2766ms
Built at: 09/05/2020 10:39:28 PM
4 assets
Entrypoint bundle = runtime.js vendor.js bundle.js
[../package.json] 1.84 KiB {bundle} [optional] [built]
[./app.scss] 61 KiB {bundle} [built]
[./main.ts] 1.13 KiB {bundle} [built]
+ 329 hidden modules
ERROR in The Angular Compiler requires TypeScript >=3.4.0 and <3.6.0 but 3.9.7 was found instead.
When now downgrading "typescript": "3.5.3", we will receive an error message that the application is not compatible anymore.
splash34$ tns debug android
The current application is not compatible with NativeScript CLI 7.0.
Run 'ns migrate' to migrate your project to NativeScript 7.
Alternatively you may try running it with '--force' to skip this check.
To Reproduce
Setup project with following dependencies:
"dependencies": {
"@angular/animations": "10.1.0",
"@angular/common": "10.1.0",
"@angular/compiler": "10.1.0",
"@angular/core": "10.1.0",
"@angular/forms": "10.1.0",
"@angular/http": "^7.2.16",
"@angular/platform-browser": "10.1.0",
"@angular/platform-browser-dynamic": "10.1.0",
"@angular/router": "10.1.0",
"@nativescript/angular": "10.1.0",
"@nativescript/core": "7.0.0",
"@nativescript/theme": "~2.3.0",
"nativescript-background-http": "^4.2.1",
"nativescript-camera": "^4.5.0",
"nativescript-fancyalert": "^3.0.9",
"nativescript-feedback": "^1.5.0",
"nativescript-material-datetimepicker": "^1.0.9",
"nativescript-modal-datetimepicker-fixed-color": "^1.1.10",
"nativescript-theme-core": "~1.0.6",
"nativescript-ui-listview": "^7.1.0",
"nativescript-ui-sidedrawer": "^7.0.4",
"node-blob": "0.0.2",
"npm": "^6.14.8",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.6.2",
"swagger-angular-generator": "^4.2.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "^8.2.14",
"@nativescript/android": "7.0.0",
"@nativescript/ios": "7.0.0",
"@nativescript/types": "~7.0.0",
"@nativescript/webpack": "~3.0.0",
"@ngtools/webpack": "~8.2.0",
"codelyzer": "~4.5.0",
"ng-swagger-gen": "^1.8.1",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"tslint": "~5.11.0",
"typescript": "~3.9.7"
}
Expected behavior
Start application after upgrade with emulators.
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 với các phiên bản dependency trong package.json và tái hiện lỗi bằng tns debug android. Kiểm tra quá trình kiểm tra khả năng tương thích của CLI và đường dẫn ns migrate để xác định NativeScript CLI 7.0.6 xử lý các yêu cầu của Angular Compiler và TypeScript như thế nào; được xem là hoàn tất khi một project được migrate đúng cách có thể khởi động mà không gặp lỗi phiên bản xung đột.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, javascript, typescript
- Lĩnh vực
- cli, mobile-dev
- 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
- 35/100