Fullcalendar in angular problem with print of multiple events - html

I have an angular 14 application with fullcalendar. If I have a lot of events in my calendar and I try to print it, the print looks like this :
First page:
Second page:
Here are the events on my calendar:
Does anyone know what might be the problem ?
Here is my package.json
{
"name": "pilotage",
"version": "1.10.0",
"scripts": {
"start": "npm run init-version && ng serve",
"start-local": "npm run init-version && ng serve",
"init-version": "node -e \"console.log('export const APP_VERSION = \\'' + process.env.npm_package_version +'\\';')\" > ./src/app/version.ts",
"build": "node --max_old_space_size=4092 \"node_modules/#angular/cli/bin/ng\" build --configuration production --configuration=production",
"bundle-all": "node bundle-all.js",
"lint": "ng lint",
"e2e": "ng e2e",
"test": "ng test --browsers Chrome",
"coverage": "ng test --code-coverage=true --browsers Chrome",
"set-node": "nvm use 12.4.0",
"msvs": "npm config set msvs_version 2017",
"memory": "node --max_old_space_size=8192",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"#angular/animations": "14.2.12",
"#angular/cdk": "14.2.1",
"#angular/common": "14.2.12",
"#angular/compiler": "14.2.12",
"#angular/core": "14.2.12",
"#angular/elements": "14.2.12",
"#angular/flex-layout": "^14.0.0-beta.41",
"#angular/forms": "14.2.12",
"#angular/localize": "14.2.12",
"#angular/platform-browser": "14.2.12",
"#angular/platform-browser-dynamic": "14.2.12",
"#angular/router": "14.2.12",
"#angular/service-worker": "14.2.12",
"#auth0/angular-jwt": "5.0.2",
"#formio/angular": "^5.3.0",
"#fullcalendar/adaptive": "6.0.1",
"#fullcalendar/angular": "6.0.1",
"#fullcalendar/core": "6.0.1",
"#fullcalendar/daygrid": "6.0.1",
"#fullcalendar/interaction": "6.0.0",
"#fullcalendar/moment": "6.0.0",
"#fullcalendar/moment-timezone": "6.0.0",
"#fullcalendar/resource": "^6.0.0",
"#fullcalendar/resource-timeline": "6.0.0",
"#fullcalendar/rrule": "6.0.0",
"#fullcalendar/timegrid": "6.0.0",
"#ng-bootstrap/ng-bootstrap": "^14.0.0",
"#popperjs/core": "^2.11.2",
"#ng-select/ng-select": "^9.0.0",
"#ngx-translate/core": "12.1.1",
"#ngx-translate/http-loader": "4.0.0",
"#swimlane/ngx-datatable": "^20.1.0",
"#types/quill": "^1.3.10",
"admin-lte": "2.3.8",
"angular-pipes": "^10.0.0",
"angular2-logger": "^0.7.0",
"bootstrap": "3.4.1",
"bootstrap-datepicker": "1.9.0",
"bootstrap3-wysihtml5-bower": "0.3.3",
"chart.js": "4.0.1",
"class-validator": "0.11.0",
"daterangepicker": "3.0.5",
"exceljs": "4.1.1",
"fastclick": "1.0.6",
"file-saver": "2.0.2",
"formio-export-mc": "0.3.32",
"formiojs": "4.12.7",
"html2canvas": "1.0.0-rc.5",
"html2pdf.js": "^0.9.2",
"i": "0.3.7",
"jQuery.print": "1.5.1",
"jquery": "3.6.2",
"jquery-knob": "1.2.11",
"jquery-slimscroll": "1.3.8",
"jquery-sparkline": "2.4.0",
"lodash": "4.17.21",
"lodash-es": "^4.17.21",
"moment": "2.29.4",
"moment-timezone": "0.5.27",
"ng-drag-drop": "^5.0.0",
"ng2-date-picker": "^15.0.1",
"ng2-file-upload": "1.4.0",
"ng2-pdf-viewer": "^6.4.0",
"ng2-timezone-selector": "0.2.4",
"ngx-accordion": "^0.0.17",
"ngx-bootstrap": "10.0.0",
"ngx-datatable": "^1.0.3",
"ngx-filesize": "2.0.2",
"ngx-image-cropper": "3.0.3",
"ngx-infinite-scroll": "8.0.1",
"ngx-pagination": "5.0.0",
"ngx-print": "^1.2.1",
"ngx-quill": "17.0.0",
"ngx-select-dropdown": "3.2.0",
"ngx-time-duration-picker": "^2.0.3",
"ngx-toastr": "13.2.1",
"ngx-tooltip": "^0.0.9",
"ngx-ui-switch": "^14.0.3",
"ngx-webstorage-service": "4.1.0",
"quill": "1.3.7",
"quill-image-resize-module": "3.0.0",
"rrule": "2.6.4",
"rxjs": "6.5.4",
"select2": "4.0.13",
"timepicker": "1.13.0",
"xlsx": "^0.16.0",
"yiq": "3.0.1",
"zone.js": "~0.11.4"
},
"devDependencies": {
"#angular-devkit/build-angular": "~14.2.10",
"#angular-devkit/core": "^14.2.10",
"#angular-devkit/schematics": "^14.2.10",
"#angular/cli": "^14.2.10",
"#angular/compiler-cli": "14.2.12",
"#angular/language-service": "14.2.12",
"#types/core-js": "2.5.2",
"#types/events": "^3.0.0",
"#types/file-saver": "2.0.1",
"#types/jasmine": "~3.6.0",
"#types/jasminewd2": "2.0.6",
"#types/jquery": "3.3.32",
"#types/moment": "2.13.0",
"#types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"prettier": "^2.4.1",
"protractor": "~7.0.0",
"sass-material-colors": "0.0.5",
"ts-node": "8.6.2",
"tslib": "^2.4.1",
"tslint": "~6.1.0",
"typescript": "4.6.4"
}
}
Also this is the configuration for my full calendar that I use :
this.options = {
editable: !this.isBusy,
events: this.eventsModel,
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridThreeDays,timeGridDay',
},
height: this.maxHeight,
droppable: true,
dayMaxEventRows: 3,
dayMaxEvents: 4,
firstDay: this.firstDay,
snapDuration: {
minutes: 15,
},
selectable: true,
timeZone: this.timeZone,
dateClick: this._dateClick,
datesSet: this._datesRender,
drop: this._drop,
eventClick: this._eventClick,
eventDidMount: this._eventDidMount,
eventDragStart: this._eventDragStart,
eventDragStop: this._eventDragStop,
eventDrop: this._eventDrop,
eventResize: this._eventResize,
eventResizeStart: this._eventResizeStart,
select: this._select,
schedulerLicenseKey: this.schedulerLicenseKey,
initialView: 'timeGridWeek',
nowIndicator: true,
locales: [frLocale],
locale: utils.getCurrentLang(),
views: {
timeGridThreeDays: {
type: 'timeGrid',
duration: { days: 3 },
buttonText: this.translateService.instant(constants.AGENDA_CUSTOMVIEWS_TIMEGRIDTHREEDAYS),
},
},
eventTimeFormat: {
hour: 'numeric',
minute: '2-digit',
},
plugins: [
dayGridPlugin,
timeGridPlugin,
interactionPlugin,
momentPlugin,
momentTimezonePlugin,
rrulePlugin,
adaptivePlugin,
],
};

Related

Expected comma or closing brace json(518) after React Native update v0.66.4

After ugrading React Native from v0.63.3 to v0.66.4 (followed RN Upgrade Helper) I get an error which derives from node_modules/jest-resolve/node_modules/resolve/test/resolver/malformed_package_json/package.json. How can I suppress or fix this?
Error: Expected comma or closing brace json(518) - the json file only contains an opening "{" tag.
Dependencies:
{
...
"dependencies": {
"#babel/polyfill": "7.0.0-beta.47",
"#babel/preset-env": "^7.5.5",
"#bugsnag/js": "^7.9.2",
"#bugsnag/plugin-react": "^7.9.2",
"#bugsnag/react-native": "^7.9.4",
"#monterosa/react-native-parallax-scroll": "https://github.com/xxxxxxxx/react-native-parallax-scroll.git#xxxxxxxxx",
"#react-native-async-storage/async-storage": "^1.15.4",
"#react-native-community/blur": "git+https://github.com/thedeepanshujain/react-native-blur.git#xxxxxxx",
"abortcontroller-polyfill": "^1.1.9",
"date-fns": "^1.29.0",
"debug": "^3.1.0",
"eslint-plugin-import": "^2.11.0",
"expr-eval": "^2.0.2",
"formik": "1.5.1",
"iban": "^0.0.10",
"mobx": "^4.3.1",
"mobx-react": "^5.2.3",
"mobx-react-lite": "^1.4.1",
"mobx-react-router": "^4.0.5",
"modal-react-native-web": "^0.2.0",
"patch-package": "https://github.com/xxxxxxxx/patch-package.git#xxxxxxxxx",
"qs": "^6.5.1",
"react": "17.0.2",
"react-dom": "16.14.0",
"react-dropzone": "^5.1.0",
"react-fast-compare": "^2.0.4",
"react-native": "0.66.4",
"react-native-actionsheet": "https://github.com/xxxxxxxx/react-native-actionsheet.git#xxxxxxxx",
"react-native-calendars": "1.1260.0",
"react-native-collapsible": "^1.6.0",
"react-native-device-info": "^5.5.3",
"react-native-document-picker": "^3.2.4",
"react-native-dropdownalert": "https://github.com/xxxxxxxxx/react-native-dropdownalert.git#xxxxxxxx",
"react-native-extra-dimensions-android": "https://github.com/xxxxxxxxx/react-native-extra-dimensions-android.git#xxxxxxxxx",
"react-native-fs": "^2.14.1",
"react-native-google-analytics-bridge": "^7.1.0",
"react-native-i18n": "git+https://github.com/lemankk/react-native-i18n.git#xxxxxxx",
"react-native-image-capinsets": "https://github.com/xxxxxxxx/react-native-image-capinsets.git#xxxxxxxx",
"react-native-image-crop-picker": "^0.25.0",
"react-native-image-zoom-viewer": "^2.2.26",
"react-native-ios-launch-arguments": "^1.1.0",
"react-native-iphone-x-helper": "^1.3.1",
"react-native-keyboard-manager": "4.0.13-15",
"react-native-linear-gradient": "^2.4.0",
"react-native-loading-placeholder": "^0.0.6",
"react-native-locale": "^0.0.19",
"react-native-pdf": "^5.0.6",
"react-native-safari-view": "^2.1.0",
"react-native-safe-area-context": "^3.1.9",
"react-native-segmented-control-tab": "^3.2.2",
"react-native-splash-screen": "3.2.0",
"react-native-svg": "12.1.1",
"react-native-touch-id": "git+https://github.com/xxxxxxxx/react-native-touch-id.git#xxxxxxx",
"react-native-version-number": "https://github.com/xxxxxxxx/react-native-version-number.git#xxxxxxx",
"react-native-web": "^0.14.0",
"react-native-web-linear-gradient": "^1.0.2",
"react-native-web-webview": "^0.2.5",
"react-native-webview": "10.10.0",
"react-navigation": "2.11.2",
"react-router": "^4.2.0",
"react-router-dom": "^4.2.2",
"resize-observer-polyfill": "^1.5.0",
"rn-fetch-blob": "^0.10.16",
"url-search-params": "^1.0.2",
"victory": "^32.0.2",
"victory-native": "^32.0.2"
},
"devDependencies": {
"#babel/core": "^7.12.9",
"#babel/eslint-parser": "^7.16.5",
"#babel/eslint-plugin": "^7.16.5",
"#babel/plugin-proposal-do-expressions": "^7.8.3",
"#babel/plugin-proposal-function-bind": "^7.8.3",
"#babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"#babel/plugin-proposal-optional-chaining": "^7.8.3",
"#babel/plugin-syntax-class-properties": "^7.8.3",
"#babel/plugin-syntax-do-expressions": "^7.8.3",
"#babel/plugin-transform-flow-strip-types": "^7.8.3",
"#babel/plugin-transform-react-jsx-source": "^7.8.3",
"#babel/plugin-transform-runtime": "^7.8.3",
"#babel/runtime": "^7.12.5",
"#bugsnag/source-maps": "^2.0.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.0.0",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-react-native-web": "^0.4.0",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
"bugsnag-build-reporter": "^1.0.3",
"copy-webpack-plugin": "^4.5.2",
"eslint": "7.14.0",
"eslint-plugin-flowtype": "^6.1.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-native": "^3.11.0",
"file-loader": "^6.0.0",
"flow-babel-webpack-plugin": "^1.1.1",
"flow-bin": "^0.158.0",
"hard-source-webpack-plugin": "^0.12.0",
"html-webpack-plugin": "^3.2.0",
"husky": "1.0.0-rc.13",
"jest": "^26.6.3",
"jetifier": "^1.6.3",
"metro-react-native-babel-preset": "^0.66.2",
"nodemon": "^1.18.3",
"npm-license-crawler": "^0.1.9",
"npm-run-all": "^4.1.2",
"prettier": "1.18.2",
"pretty-quick": "^1.4.1",
"raw-loader": "^0.5.1",
"react-art": "^16.4.2",
"react-test-renderer": "17.0.2",
"speed-measure-webpack-plugin": "^1.2.2",
"url-loader": "^1.1.1",
"webpack": "^4.17.0",
"webpack-bugsnag-plugins": "^1.6.0",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.6",
"why-did-you-update": "^1.0.6"
},
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
},
"transformIgnorePatterns": [
"node_modules/(?!(react-native|react-native-.+)/)"
],
"testPathIgnorePatterns": [
"/node_modules/",
"<rootDir>/__tests__/testLib/"
],
"setupFilesAfterEnv": [
"<rootDir>/jest-setup.js"
]
}
}

Can't resolve 'primeng/components/utils/ObjectUtils'

I migrated my project from angular 4 to angular 6 it is running well on localhost but at AOT-build time it gets an error like:
ERROR in ./aot/app/home/accountant/customercost-form.component.ngfactory.ts
Module not found: Error: Can't resolve 'primeng/components/utils/ObjectUtils' in '/home/com5/Paresh/New Angular 6/AOT-6/aot/app/home/accountant'
# ./aot/app/home/accountant/customercost-form.component.ngfactory.ts 16:10-57
# ./aot/app/home/accountant/accounts.module.ngfactory.ts
# ./app/home/index.ts
# ./app/home/auth-guard.service.ts
# ./aot/app/app.module.ngfactory.ts
# ./app/main-aot.ts
ERROR in ./aot/app/home/accountant/vendorcost-form.component.ngfactory.ts
Module not found: Error: Can't resolve 'primeng/components/utils/ObjectUtils' in '/home/com5/Paresh/New Angular 6/AOT-6/aot/app/home/accountant'
# ./aot/app/home/accountant/vendorcost-form.component.ngfactory.ts 16:10-57
# ./aot/app/home/accountant/accounts.module.ngfactory.ts
# ./app/home/index.ts
# ./app/home/auth-guard.service.ts
# ./aot/app/app.module.ngfactory.ts
# ./app/main-aot.ts
ERROR in [at-loader] ./aot/app/app.module.ngfactory.ts:67:40
TS2339: Property 'ɵm' does not exist on type 'typeof import("/home/com5/Paresh/New Angular 6/AOT-6/node_modules/#angular/core/core")'.
my tsconfig-aot.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": ["es2015","es2017", "dom"],
"noImplicitAny": true,
"removeComments": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"typeRoots": [
"node_modules/#types/"
],
"outDir": "aot",
"baseUrl": ".",
"paths": {
"#angular/*": ["node_modules/#angular/*"]
}
},
"files": [
],
"angularCompilerOptions": {
"genDir": "aot",
"skipMetadataEmit" : true
}
}
Package.json
{
"name": "My-app",
"version": "0.5.0",
"scripts": {
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
"build:aot": "node --max_old_space_size=6144 node_modules/.bin/ngc -p tsconfig-aot.json && node --max_old_space_size=6144 node_modules/.bin/rollup -c rollup-config.js",
"lite:aot": "lite-server -c aot/bs-config.json",
"e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first",
"lint": "tslint ./app/**/*.ts -t verbose",
"lite": "lite-server",
"pree2e": "webdriver-manager update",
"test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
"test-once": "tsc && karma start karma.conf.js --single-run",
"tsc": "tsc",
"tsc:w": "tsc -w",
"ngc": " node --max_old_space_size=6144 node_modules/.bin/ngc -p tsconfig-aot.json",
"webpack-prod": " npm run ngc && npm run webpack",
"webpack": "node --max_old_space_size=6144 node_modules/.bin/webpack ",
"serve": "webpack-dev-server",
"prodserver": "node prodserver"
},
"licenses": [
{
"type": "MIT",
"url": "https://github.com/angular/angular.io/blob/master/LICENSE"
}
],
"dependencies": {
"#angular/animations": "^6.1.10",
"#angular/common": "^6.1.10",
"#angular/compiler": "^6.1.10",
"#angular/compiler-cli": "^6.1.10",
"#angular/core": "^6.1.10",
"#angular/forms": "^6.1.10",
"#angular/http": "^6.1.10",
"#angular/platform-browser": "^6.1.10",
"#angular/platform-browser-dynamic": "^6.1.10",
"#angular/platform-server": "^6.1.10",
"#angular/router": "^6.1.10",
"#angular/upgrade": "^6.1.10",
"#auth0/angular-jwt": "^5.0.1",
"#ngtools/webpack": "^1.1.2",
"#types/googlemaps": "^3.2.0",
"#types/jquery": "^2.0.48",
"#types/jspdf": "^1.3.0",
"#types/node": "8.0.0",
"angular-in-memory-web-api": "^0.11.0",
"angular2-busy": "^1.0.2",
"angular2-datatable": "^0.5.3",
"angular2-datatable-pagination": "0.0.3",
"angular2-highcharts": "^0.5.5",
"angular2-image-upload": "^0.3.1",
"angular2-jwt": "^0.1.28",
"angular2-moment": "^1.0.0-beta.rc.1",
"angular2-multiselect-dropdown": "^2.9.0",
"angular2-router-loader": "^0.3.5",
"angular2-tag-input": "^1.2.3",
"bootstrap": "^3.3.7",
"bootstrap-datepicker": "^1.6.4",
"bootstrap-daterangepicker": "^2.1.25",
"bootstrap-timepicker": "^0.5.2",
"chart.js": "^2.8.0",
"core-js": "2.5.6",
"css-toggle-switch": "^4.0.2",
"express": "^4.15.3",
"fullcalendar": "^3.0.1-beta",
"highcharts": "7.1.1",
"install": "^0.10.1",
"lodash": "^4.17.11",
"moment": "2.18.1",
"mydatepicker": "^1.0.18",
"ng2-bootstrap": "^1.1.16",
"ng2-ckeditor": "1.2.0",
"ng2-datetime": "^1.4.0",
"ng2-device-detector": "^0.1.0",
"ng2-file-upload": "^1.2.0",
"ng2-imageupload": "^1.3.0",
"ng2-select2": "^1.0.0-beta.11",
"ng2-table": "^1.3.2",
"ngx-barcode": "^0.2.4",
"primeng": "^6.1.7",
"primeui": "^4.1.15",
"quill": "^1.3.0",
"reflect-metadata": "^0.1.9",
"rxjs": "6.3.2",
"rxjs-compat": "^6.6.3",
"rxjs-tslint": "^0.1.8",
"screenfull": "4.0.1",
"style-loader": "^0.17.0",
"systemjs": "0.19.40",
"tinymce": "^4.5.5",
"to-string-loader": "^1.1.5",
"tslib": "^2.0.1",
"typings": "^2.1.1",
"zone.js": "^0.8.26"
},
"devDependencies": {
"#angular/cli": "6.2.9",
"#types/file-saver": "0.0.1",
"#types/googlemaps": "^3.26.20",
"#types/jquery": "^2.0.48",
"#types/node": "7.0.7",
"angular-router-loader": "^0.6.0",
"angular2-template-loader": "0.6.2",
"angular2-toaster": "^6.1.0",
"awesome-typescript-loader": "3.1.3",
"canonical-path": "0.0.2",
"clean-webpack-plugin": "^0.1.16",
"compression-webpack-plugin": "^0.4.0",
"concurrently": "^3.0.0",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.1",
"electron-packager": "^8.7.0",
"extract-text-webpack-plugin": "^2.1.0",
"favicons-webpack-plugin": "0.0.7",
"file-loader": "^0.11.1",
"html-loader": "^0.4.3",
"html-webpack-plugin": "2.28.0",
"http-server": "^0.10.0",
"karma": "^5.2.2",
"lite-server": "^2.2.2",
"raw-loader": "^0.5.1",
"rollup": "^0.41.6",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-plugin-uglify": "^1.0.1",
"source-map-explorer": "^1.3.3",
"typescript": "2.9.2",
"webdriver-manager": "12.0.6",
"webpack": "^2.5.1",
"webpack-bundle-analyzer": "^2.8.1",
"webpack-dev-server": "2.4.5"
}
}
main-aot.ts
import { platformBrowser } from '#angular/platform-browser';
import { AppModuleNgFactory } from '../aot/app/app.module.ngfactory';
import { enableProdMode } from '#angular/core';
enableProdMode();
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
this is all my configuration files
Not sure if you're having the same problem I had, but when I upgraded from Angular 8 to 9 (and from PrimeNG 8 to 9), I needed to change the import path for ObjectUtils from "primeng/components/utils/ObjectUtils" to just "primeng/utils".

ERROR in ./node_modules/ng2-smart-table/ng2-smart-table.ngfactory.js

I am getting the below error. when i do "ng build --prod --aot"
ERROR in ./node_modules/ng2-smart-table/ng2-smart-table.ngfactory.js
Module not found: Error: Can't resolve '../#akveo/ng2-completer/ng2-completer.ngfactory' in 'C:\Shruthi\Applications\PULSE\Q2-error\pulse\Pulse-web\node_modules\ng2-smart-table'
everything works fine when i do ng build.
I am getting this error from yesterday everything was working fine in before yesterday.
Is it error because of ng2-completer or something related ng build or angular version.
below is my package.json
{
"name": "pulse-web",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"compodoc": "compodoc",
"generate-docs": "compodoc -p src/tsconfig.app.json",
"serve-docs": "compodoc -s src/tsconfig.app.json"
},
"private": true,
"dependencies": {
"#akveo/ng2-completer": "^9.0.1",
"#amcharts/amcharts4": "^4.9.6",
"#angular/animations": "~7.2.0",
"#angular/cdk": "~7.2.0",
"#angular/common": "~7.2.0",
"#angular/compiler": "~7.2.0",
"#angular/core": "~7.2.0",
"#angular/forms": "~7.2.0",
"#angular/http": "^7.2.16",
"#angular/material": "~7.2.0",
"#angular/platform-browser": "~7.2.0",
"#angular/platform-browser-dynamic": "~7.2.0",
"#angular/router": "~7.2.0",
"#compodoc/compodoc": "^1.1.11",
"#mc-dxp/dxp-styles": "^3.2.1",
"#mc-dxp/dxp-web": "^4.1.1",
"#ng-bootstrap/ng-bootstrap": "^4.1.5",
"#syncfusion/ej2-angular-buttons": "^17.4.49",
"#syncfusion/ej2-angular-lists": "^17.4.47",
"#syncfusion/ej2-angular-navigations": "^17.4.49",
"#types/crypto-js": "^3.1.43",
"acorn": "^6.1.1",
"bootstrap": "^4.4.1",
"core-js": "^2.5.4",
"jquery": "^3.4.1",
"jw-angular-pagination": "^1.1.0",
"moment": "^2.24.0",
"ng2-completer": "^2.0.8",
"ng2-smart-table": "^1.5.0",
"ngx-bootstrap": "^5.3.2",
"ngx-cookie-service": "^2.3.0",
"ngx-select-dropdown": "1.3.0",
"popper.js": "^1.16.1",
"rxjs": "~6.3.3",
"rxjs-compat": "^6.5.4",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.13.0",
"#angular/cli": "~7.3.8",
"#angular/compiler-cli": "~7.2.0",
"#angular/language-service": "~7.2.0",
"#types/node": "~8.9.4",
"#types/jasmine": "~2.8.8",
"#types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
Pleas help me! Not able to figure out the reason
It seems to be a problem with the library itself. See this: https://github.com/akveo/ng2-smart-table/issues/1143. We are also facing the same problem while upgrading our application to Angular 9.
If you are using Ang 9
Upgrade these libraries to these versions
"ng2-completer": "^9.0.1",
"ng2-smart-table": "^1.6.0",
"typescript": "3.8.3" // note explicit ie no "~" or "^"

TypeError: Cannot read property 'length' of undefined (Converting angular to angular 4)

TypeError: Cannot read property 'length' of undefined
Console log
Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at createSourceFile (c:\Users\Amina\Desktop\LendingTree\node_modules\typescript\lib\typescript.js:15457:109)
at parseSourceFileWorker (c:\Users\Amina\Desktop\LendingTree\node_modules\typescript\lib\typescript.js:15389:26)
at Object.parseSourceFile (c:\Users\Amina\Desktop\LendingTree\node_modules\typescript\lib\typescript.js:15338:26)
at Object.createSourceFile (c:\Users\Amina\Desktop\LendingTree\node_modules\typescript\lib\typescript.js:15192:29)
at new TypeScriptFileRefactor (c:\Users\Amina\Desktop\LendingTree\node_modules\#ngtools\webpack\src\refactor.js:34:35)
at Object.resolveEntryModuleFromMain (c:\Users\Amina\Desktop\LendingTree\node_modules\#ngtools\webpack\src\entry_resolver.
js:105:20)
at AotPlugin._setupOptions (c:\Users\Amina\Desktop\LendingTree\node_modules\#ngtools\webpack\src\plugin.js:152:50)
at new AotPlugin (c:\Users\Amina\Desktop\LendingTree\node_modules\#ngtools\webpack\src\plugin.js:27:14)
at _createAotPlugin (c:\Users\Amina\Desktop\LendingTree\node_modules\#angular\cli\models\webpack-configs\typescript.js:55:
12)
at Object.exports.getNonAotConfig (c:\Users\Amina\Desktop\LendingTree\node_modules\#angular\cli\models\webpack-configs\typ
escript.js:71:19)
at NgCliWebpackConfig.buildConfig (c:\Users\Amina\Desktop\LendingTree\node_modules\#angular\cli\models\webpack-config.js:2
9:37)
at Class.run (c:\Users\Amina\Desktop\LendingTree\node_modules\#angular\cli\tasks\serve.js:43:98)
at check_port_1.checkPort.then.port (c:\Users\Amina\Desktop\LendingTree\node_modules\#angular\cli\commands\serve.js:114:26
)
at process._tickCallback (internal/process/next_tick.js:109:7)
Package.Json
{
"name": "lending-tree",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#agm/core": "^1.0.0-beta.1",
"#angular/animations": "^4.2.4",
"#angular/common": "^4.2.4",
"#angular/compiler": "^4.2.4",
"#angular/core": "^4.2.4",
"#angular/forms": "^4.2.4",
"#angular/http": "^4.2.4",
"#angular/platform-browser": "^4.2.4",
"#angular/platform-browser-dynamic": "^4.2.4",
"#angular/router": "^4.2.4",
"#types/googlemaps": "^3.29.0",
"core-js": "^2.4.1",
"rxjs": "^5.4.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/cli": "1.3.1",
"#angular/compiler-cli": "^4.2.4",
"#angular/language-service": "^4.2.4",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "~6.0.60",
"codelyzer": "~3.1.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.3.2",
"typescript": "~2.3.3"
}
}
I have created a new project with cli ng new projectName
Replaced app folder with my existing project.
Added template for front view in the root directory of an application.
Updated index.html only added some css and scripts.
Moved main.ts src to app folder, and changed the imports statements.
That are only changes, I have made so far.

Angular2 bundle.js:2 Uncaught ReferenceError: google is not defined

I use the 2.0.0-rc.4 version of Angular. I have always "google is not defined" problem in my console
console error
bundle.js:2 Uncaught ReferenceError: google is not defined
With Angular Beta without gulp, I have not had the problem.
typings folder content
my ** gulpfile.js** file
var gulp = require('gulp');
gulp.task('bundle', function() {
var SystemBuilder = require('systemjs-builder');
var builder = new SystemBuilder();
builder.loadConfig('./system.config.js')
.then(function(){
var outputFile = 'dist/bundle.js';
return builder.buildStatic('app', outputFile, {
minify: true,
mangle: true,
rollup: true
});
})
.then(function(){
console.log('bundle built successfully!');
});
});
package.json
{
"name": "angular2-poc",
"scripts": {
"clean": "gulp clean",
"compile": "gulp compile",
"build": "gulp build",
"postinstall": "typings install",
"test": "tsc && karma start",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
"typings": "typings"
},
"devDependencies": {
"concurrently": "^1.0.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-jshint": "^2.0.1",
"gulp-minify": "0.0.11",
"gulp-rename": "^1.2.2",
"gulp-sass": "^2.3.1",
"gulp-uglify": "^1.5.3",
"gulp-util": "^3.0.7",
"jasmine-core": "~2.3.4",
"jshint": "^2.9.2",
"karma": "~0.13.15",
"karma-jasmine": "~0.3.6",
"karma-phantomjs2-launcher": "^0.3.2",
"lite-server": "2.0.1",
"path": "^0.12.7",
"systemjs-builder": "^0.15.16",
"traceur": "^0.0.91",
"typescript": "^1.7.3",
"yargs": "^4.7.0"
},
"dependencies": {
"#angular/common": "2.0.0-rc.4",
"#angular/compiler": "2.0.0-rc.4",
"#angular/core": "2.0.0-rc.4",
"#angular/http": "2.0.0-rc.4",
"#angular/platform-browser": "2.0.0-rc.4",
"#angular/platform-browser-dynamic": "2.0.0-rc.4",
"#angular/router": "3.0.0-beta.1",
"#angular/upgrade": "2.0.0-rc.4",
"#angular/forms": "0.2.0",
"es6-shim": "^0.35.0",
"events": "^1.0.2",
"fbjs": "^0.3.1",
"flux": "^2.1.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
}
}
My tsd.json file
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"googlemaps/google.maps.d.ts": {
"commit": "de82425735f84a10b43921ae4b1d085b3752a626"
}
}
}
Thanks you
Try loading these 2 files from your index.html
<script src="https://www.gstatic.com/charts/loader.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
For more details, refer this - https://developers.google.com/chart/interactive/docs/basic_load_libs
See if this helps.