NativeScript / NativeScript/plugins
Error DateTimePicker in module @nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 206
- Forks
- 123
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 1
Descripción
Hello,
I have a problem when building my project with nativescript angular
The error :
ERROR in ./node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs
Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'D:\GitHub\tina\TinaAppV2\node_modules\@nativescript\datetimepicker\angular\fesm2015\nativescript-datetimepicker-angular.mjs: This application depends upon a library published using Angular version 14.0.4, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
8 | }
9 | DatePickerFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
> 10 | DatePickerFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: DatePickerFieldDirective, selector: "DatePickerField", ngImport: i0 });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, decorators: [{
12 | type: Directive,
13 | args: [{'
at run (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transformation\index.js:37:15)
at run.next (<anonymous>)
at Function.transform (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transform.js:25:41)
at transform.next (<anonymous>)
at step (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:261:32)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:273:13
at async.call.result.err.err (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:223:11)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:37:40
@ ./src/app/app.module.ts 4:0-88 24:12-44
@ ./src/main.ts 4:0-45 6:69-78
webpack 5.70.0 compiled with 1 error in 39620 ms
Webpack compilation complete. Watching for file changes.
File change detected. Starting incremental webpack compilation...
assets by status 20.5 MiB [cached] 49 assets
assets by path . 88.5 KiB
asset runtime.js 87.7 KiB [emitted] (name: runtime)
asset runtime.d05486ba579ffe17e097.hot-update.js 736 bytes [emitted] [immutable] [hmr] (name: runtime)
asset runtime.d05486ba579ffe17e097.hot-update.json 31 bytes [emitted] [immutable] [hmr]
Entrypoint bundle 19.7 MiB = runtime.js 87.7 KiB runtime.d05486ba579ffe17e097.hot-update.js 736 bytes vendor.js 17.5 MiB bundle.js 2.18 MiB
cached modules 6.59 MiB [cached] 742 modules
runtime modules 25.2 KiB 13 modules
./node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs 39 bytes [built] [1 error]
ERROR in ./node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs
Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'D:\GitHub\tina\TinaAppV2\node_modules\@nativescript\datetimepicker\angular\fesm2015\nativescript-datetimepicker-angular.mjs: This application depends upon a library published using Angular version 14.0.4, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
8 | }
9 | DatePickerFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
> 10 | DatePickerFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: DatePickerFieldDirective, selector: "DatePickerField", ngImport: i0 });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, decorators: [{
12 | type: Directive,
13 | args: [{'
at run (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transformation\index.js:37:15)
at run.next (<anonymous>)
at Function.transform (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transform.js:25:41)
at transform.next (<anonymous>)
at step (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:261:32)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:273:13
at async.call.result.err.err (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:223:11)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:37:40
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
@ ./src/app/app.module.ts 4:0-88 24:12-44
@ ./src/main.ts 4:0-45 6:69-78
webpack 5.70.0 compiled with 1 error in 1858 ms
Webpack compilation complete. Watching for file changes.
File change detected. Starting incremental webpack compilation...
assets by status 20.5 MiB [cached] 49 assets
assets by path . 88.5 KiB
asset runtime.js 87.7 KiB [emitted] (name: runtime)
asset runtime.6078891759685e2740ea.hot-update.js 736 bytes [emitted] [immutable] [hmr] (name: runtime)
asset runtime.6078891759685e2740ea.hot-update.json 31 bytes [emitted] [immutable] [hmr]
Entrypoint bundle 19.7 MiB = runtime.js 87.7 KiB runtime.6078891759685e2740ea.hot-update.js 736 bytes vendor.js 17.5 MiB bundle.js 2.18 MiB
cached modules 6.59 MiB [cached] 742 modules
runtime modules 25.2 KiB 13 modules
./node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs 39 bytes [built] [1 error]
ERROR in ./node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs
Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'D:\GitHub\tina\TinaAppV2\node_modules\@nativescript\datetimepicker\angular\fesm2015\nativescript-datetimepicker-angular.mjs: This application depends upon a library published using Angular version 14.0.4, which requires Angular version 14.0.0 or newer to work correctly.
Consider upgrading your application to use a more recent version of Angular.
8 | }
9 | DatePickerFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
> 10 | DatePickerFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.4", type: DatePickerFieldDirective, selector: "DatePickerField", ngImport: i0 });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11 | i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.4", ngImport: i0, type: DatePickerFieldDirective, decorators: [{
12 | type: Directive,
13 | args: [{'
at run (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transformation\index.js:37:15)
at run.next (<anonymous>)
at Function.transform (D:\GitHub\tina\TinaAppV2\node_modules\@babel\core\lib\transform.js:25:41)
at transform.next (<anonymous>)
at step (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:261:32)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:273:13
at async.call.result.err.err (D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:223:11)
at D:\GitHub\tina\TinaAppV2\node_modules\gensync\index.js:37:40
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at runNextTicks (node:internal/process/task_queues:65:3)
at processImmediate (node:internal/timers:437:9)
@ ./src/app/app.module.ts 4:0-88 24:12-44
@ ./src/main.ts 4:0-45 6:69-78
So I tried to upgrade angular to 14 as suggested but it gave me more errors that I don't know how to fix them and I know the plugin
is supposed to work with angular 13
ng version

my package.json
{
"name": "TinaAppV2",
"main": "./src/main.ts",
"version": "1.0.0",
"private": true,
"dependencies": {
"@angular/animations": "~13.2.0",
"@angular/common": "~13.2.0",
"@angular/compiler": "~13.2.0",
"@angular/core": "~13.2.0",
"@angular/forms": "~13.2.0",
"@angular/platform-browser": "~13.2.0",
"@angular/platform-browser-dynamic": "~13.2.0",
"@angular/router": "~13.2.0",
"@nativescript/angular": "^13.0.0",
"@nativescript/core": "~8.2.2",
"@nativescript/datetimepicker": "^2.1.9",
"@nativescript/firebase": "^11.1.2",
"@nativescript/geolocation": "^8.0.2",
"@nativescript/theme": "~3.0.2",
"@nstudio/nativescript-checkbox": "^2.0.5",
"@nstudio/nativescript-floatingactionbutton": "^3.0.4",
"@nstudio/nativescript-pulltorefresh": "^3.0.2",
"nativescript-forgm-sound": "^1.1.3",
"nativescript-ui-chart": "^9.0.2",
"nativescript-ui-sidedrawer": "^10.0.2",
"rxjs": "~7.5.0",
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.3.6",
"@angular/compiler-cli": "~13.2.0",
"@nativescript/android": "8.2.3",
"@nativescript/ios": "8.2.3",
"@nativescript/types": "~8.2.0",
"@nativescript/webpack": "~5.0.6",
"@ngtools/webpack": "~13.2.0",
"typescript": "~4.5.5"
}
}
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con el paquete indicado en node_modules/@nativescript/datetimepicker/angular/fesm2015/nativescript-datetimepicker-angular.mjs y las versiones de Angular en package.json. Reproduce la compilación a través de src/app/app.module.ts y determina si el plugin puede compilarse con las dependencias de Angular 13 indicadas. Se considera terminado cuando el error de compilación de webpack indicado se resuelve sin introducir errores adicionales de actualización.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- build-system, mobile-dev
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100