Cannot find module 'ng-apexcharts'
See original GitHub issueHI i first of all thanks for the angular wrapper. Great work. I thought of using the library for one of my projects and i get the following error when i try to import the module into the application as follows.
import { AppComponent } from './app.component';
import { NgApexchartsModule } from 'ng-apexcharts';
ERROR in src/app/app.module.ts(14,36): error TS2307: Cannot find module ‘ng-apexcharts’
I have followed the same steps as mentioned in the the docs and it doesnt seem to be working. Can you please look into the issue and let me know if there are any workarounds/Solution for this. Thanks.
My working environment:
Package JSON:
"@angular/animations": "~7.0.0",
"@angular/common": "~7.0.0",
"@angular/compiler": "~7.0.0",
"@angular/core": "~7.0.0",
"@angular/forms": "~7.0.0",
"@angular/http": "~7.0.0",
"@angular/platform-browser": "~7.0.0",
"@angular/platform-browser-dynamic": "~7.0.0",
"@angular/router": "~7.0.0",
"apexcharts": "^3.6.4",
"core-js": "^2.5.4",
"ng-apexcharts": "^1.0.0",
"rxjs": "~6.3.3",
"zone.js": "~0.8.26"
Angular CLi
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"try": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/try",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/apexcharts/dist/apexcharts.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "try:build"
},
"configurations": {
"production": {
"browserTarget": "try:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "try:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/apexcharts/dist/apexcharts.min.js"
],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"try-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "try:serve"
},
"configurations": {
"production": {
"devServerTarget": "try:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "try"
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
ng-apexcharts - npm
Start using ng-apexcharts in your project by running `npm i ng-apexcharts`. There are 22 other projects in the npm registry using ng-apexcharts.
Read more >Cannot find module 'ng-apexcharts' in spec.ts - Stack Overflow
I'm currently trying to do unit tests on my Angular app using ng-apexcharts lib. Unfortunately, when I run my tests with Jest, ...
Read more >How to create Angular charts using ApexCharts
1. Install using npm npm install apexcharts ng-apexcharts --save · 2. Open angular.json and under scripts add: "scripts": [ "node_modules/apexcharts/dist/ ...
Read more >ng-apexcharts - npm Package Health Analysis - Snyk
We found a way for you to contribute to the project! Looks like ng-apexcharts is missing a security policy. You can connect your...
Read more >ng-apexcharts angular 8 - Code Examples & Solutions For ...
npm install apexcharts ng-apexcharts --save.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released version 1.0.1 Please try
Only step one work for me