-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Cannot install canvas module from npm #1520
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
Comments
Full log
|
@wolfy01 Can you confirm this being the same issue on your end? |
@Kreyren I don't think mine even got that far |
@wolfy01 Provide more informations on what is the issue then so that i can provide a better help :p kreyren likes logs and short videos with the issue |
|
@Kreyren Is there any other information I should provide? |
@wolfy01 append this to your dockerfile and see if that resolves the issue: RUN true \
&& apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev |
@wolfy01 report back if it does seems that canvas needs |
@Kreyren I'm sorry but how should I append that to my dockerfile? |
@wolfy01 You need to have a file image:
file: path/to/dockerfile where path/to/dockerfile should point to a dockerfile within your repository with a content like: FROM gitpod/workspace-full
USER root
RUN true \
&& apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev Alternatively if you do NOT have a EDIT: See https://github.com/RXT0112/Zernit/blob/master/.gitpod.yml#L2 and https://github.com/RXT0112/Zernit/blob/master/gitpod/debian.Dockerfile for real-life example EDIT: Typo |
@wolfy01 Does that make sense? O.o |
I've concluded these being required for gitpod to be able to build canvas https://www.npmjs.com/package/canvas on gitpod to avoid gitpod-io/gitpod#1520 Fixes: gitpod-io/gitpod#1520 Signed-off-by: Jacob Hrbek <kreyren@member.fsf.org>
@Kreyren Yea, that makes sense. Thanks... sorry for the late response |
@Kreyren Also that didn't seem to work? |
Provide an output from Also try RUN true \
&& apt-get update \
&& apt-get install -y apt-utils \
&& apt-get install -y \
libcairo2-dev \
libpango1.0-dev \
node-nan \
node-gyp \
libjpeg-dev \
libgif-dev \
librsvg2-dev Seems that |
Which seems to work for me, see gitpod-io/workspace-images#232 (comment) |
Example configuration on https://gitpod.io/#https://github.com/Kreyren/gitpod-1520 |
UPDATE: nevermind that is not enough, checking why assuming it worked yesterday O.o |
Relevant: Automattic/node-canvas#1496 |
Based on my research i've concluded that using `libjpeg-dev` breaks the canvas on Ubuntu 18~20 -> Updating docs for `libjpeg8-dev` Relevant: gitpod-io/gitpod#1520 Relevant: Automattic#1496 Signed-off-by: Jacob Hrbek <kreyren@member.fsf.org>
@wolfy01 EDIT: This works for me https://github.com/Kreyren/gitpod-1520/blob/master/.gitpod.Dockerfile, concluded that Merge request submitted gitpod-io/workspace-images#232 so you can wait for it to be merged or append these packages to your dockerfile. |
@wolfy01 See gitpod-io/workspace-images#232 (comment) seems that you only need to add |
Closing as not-our-bug assuming this seemingly (and based on info from upstream) being an issue with npm dependencies where |
Also note that according to upstream (Automattic/node-canvas#1582 (comment))
|
@Kreyren Alright, thanks! |
Describe the bug
Cannot install the npm
canvas
module.Steps to reproduce
npm i canvas
Expected behavior
Expected canvas to be installed successfully.
The text was updated successfully, but these errors were encountered: