angular4 data table Error as ./node_modules/angular-4-data-table/src/index.ts - angular4-forms

Im getting error as after i install datatabel npm install angular-4-data-table --save
ERROR in ./node_modules/angular-4-data-table/src/index.ts
Module build failed: Error: C:\SOFT\Angular\Angular\node_modules\angular-4-data-table\src\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

You are certenly using a higher version of angular which is not well organised with angular-data-table4 then upgrade for 5 version of the grid :
npm install angular5-data-table --save
and in App Module use:
import {DataTableModule} from 'angular5-data-table';
use in component
import { ... } from 'angular5-data-table';
it worked for me

Related

Missing dependency: ionic-angular when trying to use ionic-stepper

I want to use ionic-stepper in my project.
I downloaded this package from https://www.npmjs.com/package/ionic-stepper. When I use it, I get the following error:
ERROR in The target entry-point "ionic-stepper" has missing dependencies:
[ng] - ionic-angular
What does this mean, and how can I fix it?
The error message is pretty clear. You're missing ionic-angular:
ERROR in The target entry-point "ionic-stepper" has missing dependencies:
[ng] - ionic-angular
ionic-angular is listed as a dependency, so you'll need to get a copy if you want to use ionic-stepper.
Here is the cause of your problem:
I downloaded this package...
Manually downloading files isn't the recommended way to install libraries from NPM.
Instead, use Yarn or the NPM CLI tool to install it. These tools will automatically identify and install dependent packages, like ionic-angular:
yarn add ionic-stepper

Upgrade to Ionic 5 with Angular 9 from Ionic 4 / Angular 7

There is a great tutorial video on the official Ionic YouTube channel which will show you a best-case scenario for upgrading to Ionic 5 and Angular 9.
However for my simple prototype app that I had made last year (just a demo that let me reorder a list) I tried to update but almost immediately came off the rails.
It turned out to be using "#angular/core": "^7.2.2" which broke the app from ionic serve because it was expecting Angular 8.
Then I tried to run the ng upgrade but got hit with incompatible peer dependencies for codelyzer, #ionic/angular-toolkit, and #angular/http.
So I tried to upgrade to Angular 8 first with npm i #angular/core#"~8.x.x" but that failed as it needed npm i zone.js#~0.9.1.
How can I update successfully to the latest and greatest?
So for people coming from angular 7 it seems for this project the correct upgrade commands are:
npm i #ionic/angular#latest
npm i zone.js#~0.9.1
npm i #angular/core#"~8.x.x"
npm i #ionic/angular-toolkit#latest
npm i codelyzer#latest
npm remove #angular/http
ng update #angular/core #angular/cli --allow-dirty
and it finally updated everything. However I did see a warning saying Package not installed: "--allow-dirty". Skipping.
However, then after that I dared to try ionic build and it failed with this error, which got me stuck for another 15 minutes:
zone-flags.ts is missing from the TypeScript compilation.
It seems that the polyfills.ts uses the .ts extension in the include which is breaking the compilation.
I changed this line in polyfills.ts:
import './zone-flags.ts';
To this:
import './zone-flags';
AND IT COMPILED.
But did it ionic serve?
No. No it did not.
The browser showed this in the console:
Error: Angular JIT compilation failed: '#angular/compiler' not loaded!
So after some more searching, I found that if you open main.ts and then add
import '#angular/compiler';
Near the top then all will be right and good with the world once more...
...unless your project then needs the markup breaking changes resolving, but you're on your own for that.

How to fix "Elastigantt is not defined" error in Vue.js(laravel)

I installed one package in our laravel project i.e. npm install --save gantt-elastic, when i tried to implement in my Vue component it shows me error "Elastigantt is not defined" not able to identify the issue. please help me out from this.
https://vuejsexamples.com/elastic-gantt-chart-with-vue-js/
update gantt-elastic to latest version :]
check examples folder to figure out how to integrate gantt in your project
https://github.com/neuronetio/gantt-elastic

How to fix Cannot find module 'rxjs-compat/Observable' error?

I am creating an ionic app with Ionic 4 based on angular 6!
To set the screen orientation installed the below plugin.
ionic cordova plugin add cordova-plugin-screen-orientation
npm install --save #ionic-native/screen-orientation
And imported in required typescript! But when i run the project i got the error below.
ERROR in node_modules/#ionic-native/screen-orientation/index.d.ts(2,10): error TS2305: Module '"/Users/karthikcp/Documents/IONIC/myBake/node_modules/rxjs/Observable"' has no exported member 'Observable'.
[ng] node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
Can anyone help me in fixing this error?
In Ionic 4 you need to install all your native plugins as beta:
npm install --save #ionic-native/screen-orientation#beta
Inside your code, for Angular, the import path should end with /ngx.
import { ScreenOrientation } from '#ionic-native/screen-orientation/ngx';
Don't install rxjs-compact.
npm i rxjs-compat
Please add these command on your root folder

Ionic Pro App fails to build on Ionic's build service due to an issue with a package

I am using the jsonpath package from NPM on my Ionic 3.0 app. It is in my package.json like so:
> "jsonpath": "1.0.0",
On my local machine, the app builds successfully and all is well.
However, once I push the code off to Ionic's servers, the code fails to transpile because of the following error:
Cannot find module 'JSONPath'
I noticed that earlier in the build log npminstall appears to successfully install this dependency:
jsonpath#1.0.0 postinstall /usr/src/app/node_modules/jsonpath
...
npm install succeeded
So unfortunately there is little clue what the problem might be.
Here's how I am referencing this dependency in my TypeScript:
import { JsonPath } from 'JSONPath';
Am I doing something silly anywhere? Any suspicions as to why this might be happening?
I resolved the issue by simply changing how I reference the package from this:
import { JsonPath } from 'JSONPATH';
to
import { JsonPath } from 'jsonpath';
It unfortunately didn't cross my mind that it would be case-sensitive. Also, why would it work on my local machine but not using Ionic's build tools? What's different? Is the Ionic build service stricter?