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

cant able to import the package #9

Closed
Wreaking opened this issue Aug 7, 2022 · 11 comments
Closed

cant able to import the package #9

Wreaking opened this issue Aug 7, 2022 · 11 comments
Assignees
Labels
installation issue Installation issue that is related to a module dependency

Comments

@Wreaking
Copy link

Wreaking commented Aug 7, 2022

image

@warix8
Copy link
Owner

warix8 commented Aug 8, 2022

Glad to know that you want to use my module 😄

It seems that there is a problem with the canvas installation.
Maybe you can try to install canvas first.
I assume that you are on Windows, so you can check this canvas guide for windows installation https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

I hope this will solve your problem

@warix8 warix8 self-assigned this Aug 8, 2022
@warix8 warix8 added the installation issue Installation issue that is related to a module dependency label Aug 8, 2022
@Wreaking
Copy link
Author

Wreaking commented Aug 8, 2022

Glad to know that you want to use my module 😄

It seems that there is a problem with the canvas installation. Maybe you can try to install canvas first. I assume that you are on Windows, so you can check this canvas guide for windows installation https://github.com/Automattic/node-canvas/wiki/Installation:-Windows

I hope this will solve your problem

@Wreaking Wreaking closed this as completed Aug 8, 2022
@Wreaking Wreaking reopened this Aug 8, 2022
@Wreaking
Copy link
Author

Wreaking commented Aug 8, 2022

wait, isnt canvas outdated package? i heard about it in djs supportive server

@warix8
Copy link
Owner

warix8 commented Aug 8, 2022

I've never heard of it and I don't see it on the internet now. There are always 800k downloads of canvas per week on npm.
I don't know who said that but I don't think that's the case.
Also, did you get the package to work?

@Wreaking
Copy link
Author

Wreaking commented Aug 8, 2022

didnt work while following the steps to download canvas in https://www.youtube.com/watch?v=SletQOmrhcM

@warix8
Copy link
Owner

warix8 commented Aug 8, 2022

Are you sure that node-gyp is installed ? https://github.com/nodejs/node-gyp#on-windows

If yes, can you give me your:

  • NodeJs version
  • node-gyp version

The issue in canvas are often related to node-gyp. So you can try to do node-gyp rebuild or reinstall it and verify that it is installed globally.

@Wreaking
Copy link
Author

Wreaking commented Aug 9, 2022

my node.js version is 18.4.0
node-gyp 9.1.0
image

@warix8
Copy link
Owner

warix8 commented Aug 9, 2022

It's really strange, but you can try a node-gyp rebuild then if it's not working try this

npm uninstall node-pre-gyp -g --save
npm install @mapbox/node-pre-gyp -g --save

@Wreaking
Copy link
Author

Wreaking commented Aug 9, 2022

well its not working either. could u use other packages rather using canvas like canvacord?

@warix8
Copy link
Owner

warix8 commented Aug 9, 2022

It's a bit hard, because I'm using chart.js to make graph and it depends of canvas.

But, I'm sure that you can fix your issue by searching your errors on Internet et try some fixes.

Nevertheless, I will have a look if I can fork chartjs and try to use an other canvas like canvacord.

@Wreaking
Copy link
Author

okay i will try to fix it thx

@warix8 warix8 closed this as completed Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation issue Installation issue that is related to a module dependency
Projects
None yet
Development

No branches or pull requests

2 participants