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 find High Charts Module #16

Closed
Maaster opened this issue Jul 13, 2019 · 11 comments
Closed

Cannot find High Charts Module #16

Maaster opened this issue Jul 13, 2019 · 11 comments
Labels
question Further information is requested

Comments

@Maaster
Copy link

Maaster commented Jul 13, 2019

Hey there, followed the installation guide and installed everything beforehand.
On doing

npm i

it throws an error stating that the High Charts Module cannot be found.

Log of it: https://pastebin.com/MStvGdgM

I probably missed a really obvious thing and will feel stupid once its fixed, but I guess Id ask because I really wanna use this awesome bot.

For reference, running this in a completely new Ubuntu 18.04.2 VM.

Thanks :D

@LeaPhant
Copy link
Owner

Hi! There might be a problem with the interaction required during the highcharts installation. Try running ACCEPT_HIGHCHARTS_LICENSE=1 npm i instead.

@LeaPhant LeaPhant added the question Further information is requested label Jul 13, 2019
@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

Fails with the same error sadly.

@LeaPhant
Copy link
Owner

That's really weird, does just installing highcharts on its own work? npm i highcharts-export-server

If it doesn't it's probably an issue with highcharts.

@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

This throws some more warnings beforehand, but results in the same error in the end.

https://puu.sh/DSo21/ac943b2403.png

@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

I installed nodejs via

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -sudo apt-get install -y nodejs

As per https://github.com/nodesource/distributions/blob/master/README.md

Maybe I was wrong there?

@LeaPhant
Copy link
Owner

No, that's the correct one. Can you please try again after removing node_modules by running rm -rf node_modules?

@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

Same error.

https://puu.sh/DSobj/ab72f114e9.png

@LeaPhant
Copy link
Owner

I've really run out of ideas then. :(

Maybe ask at Highcharts' issues tracker: https://github.com/highcharts/node-export-server/issues

@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

Alright, I nuked my VM and reinstalled everything.
By googling a bit it seems to be a problem of npm with phantomJS (see Alex-Rose/fb-messenger-cli#109), as that module threw an error when trying to manually install highcharts-export-server.
With --ignore-scripts npm i runs through and I could configure everything.
However on starting, the canvas module is not found:
https://puu.sh/DSpZg/83c3aed9aa.png

I did

apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

before and it went through with no errors.
This doesnt seem related to highcharts so Im guessing (or rather hoping) the --ignore-scripts parameter didnt break anything?

@LeaPhant
Copy link
Owner

Running with --ignore-scripts will not run any build scripts, so the native part of node-canvas is never built. It might also break other modules without notice so it really shouldn't be used. If you are on a Windows 10 host you could try using WSL by following the guide in #9 instead of a VM.

@Maaster
Copy link
Author

Maaster commented Jul 13, 2019

Na das war ja ne schwere Geburt...

Anyway, it works now.
I can't fully put my finger on what it was now, but heres what I did:

npm install -g node-pre-gyp

npm install canvas

Then it threw an error regarding "primordials not defined", which google said was an node error in Version 12.
Which was...weird, as I installed 10 (see answer above).
Curiously node -v returned 12.
So I installed nvm, switch it to 10.16.0 and voila, npm i went through and so did npm start.

Bot is running on discord server now, thanks :)

Onto getting the pp command running, but thats for another issue.

@Maaster Maaster closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants