Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'write' of undefined #79

Open
beramod opened this issue May 30, 2018 · 4 comments
Open

Cannot read property 'write' of undefined #79

beramod opened this issue May 30, 2018 · 4 comments

Comments

@beramod
Copy link

beramod commented May 30, 2018

Hi
I'm trying to use amchart in my project. But it does not work.
Package versions ar as follows.

angular 5.0.0
[email protected]
[email protected]

"../node_modules/amcharts3/amcharts/amcharts.js",
"../node_modules/amcharts3/amcharts/serial.js",
"../node_modules/amcharts3/amcharts/themes/light.js",
"../node_modules/amcharts3/amcharts/plugins/export/export.min.js"

...

  <script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
  <script src="https://www.amcharts.com/lib/3/radar.js"></script>
  <script src="https://www.amcharts.com/lib/3/serial.js"></script>
  <script src="https://www.amcharts.com/lib/3/themes/light.js"></script>

Can you please suggest me.
thank you.

@shreddison
Copy link

shreddison commented May 30, 2018

We need more details.
1- Are you adding the scripts to your index file or to you angular-cli.json file? I see both
2- Any error message?
3- Where are you initializing it?

@hitenzaptech
Copy link

Angular CLI v6.1.2 fixed the issue.

Update your version :

npm update -g @angular/cli

@LuoSven
Copy link

LuoSven commented Sep 21, 2018

@hitenzaptech it doesn't work ,still error ,my Angular CLI is 6.2.3
Uncaught TypeError: Cannot read property 'write' of undefined
at Object.d.realWrite (amcharts-s.js:181)
at amcharts-s.js:175
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:496)
at ZoneTask.invoke (zone.js:485)
at timer (zone.js:2054)
d.realWrite @ amcharts-s.js:181
(anonymous) @ amcharts-s.js:175
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:496
ZoneTask.invoke @ zone.js:485
timer @ zone.js:2054
setTimeout (async)
scheduleTask @ zone.js:2075
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMacroTask @ zone.js:255
scheduleMacroTaskWithCurrentZone @ zone.js:1114
(anonymous) @ zone.js:2090
proto.(anonymous function) @ zone.js:1394
(anonymous) @ amcharts-s.js:174
d.handleLoad @ amcharts-s.js:105
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:496
invokeTask @ zone.js:1540
globalZoneAwareCaptureCallback @ zone.js:1598
load (async)
customScheduleGlobal @ zone.js:1666
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:407
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:232
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask @ zone.js:258
(anonymous) @ zone.js:1831
(anonymous) @ amcharts-s.js:125
(anonymous) @ amcharts-s.js:194

I have already added the scripts to angular.json
image

@LuoSven
Copy link

LuoSven commented Sep 21, 2018

I worked out finally, it's just the config problem ........
if you have this issue , please see here to make sure your config is right https://www.amcharts.com/kbase/your-first-ammap/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants