a year ago
I've keep getting this error, I've been trying to fix this for months. Everything works fine on replit after I install and import the canvas node mod, but when I deploy to railway I get this error
0 Replies
Btw, In order to make canvas work on replit I had to add this
{pkgs}: {
deps = [
pkgs.nodePackages.prettier
pkgs.libuuid
];
env = { LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [pkgs.libuuid]; };
}
To my replit.nix file
a year ago
and we supposedly did that here too
a year ago
no, but try moving to a dockerfile based build
How do I do that? Is it just something I need to install on replit? I'm not very experienced with backend programming if you coudnt tell, I mostly just build websites so all of this is new to me
a year ago
try adding this as a Dockerfile
to your project
FROM node:20.10.0-alpine
ENV NODE_ENV production
ENV NPM_CONFIG_UPDATE_NOTIFIER false
ENV NPM_CONFIG_FUND false
RUN apk add --update --no-cache \
libuuid \
python3 \
build-base \
pkgconf \
pixman \
cairo-dev \
pango-dev \
jpeg-dev \
giflib-dev
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . ./
CMD node src/index.js
a year ago
locally yes
a year ago
build logs please
a year ago
i have updated this, please update your Dockerfile too
a year ago
yeah but node-gyp needs python
a year ago
might also need other things, but we will start with that
a year ago
thats not the same error
a year ago
it do look the same
a year ago
updated
a year ago
what node version do you use locally?
a year ago
haha why didnt you tell me you dont use node 18 locally
a year ago
updated
a year ago
nah it still needs python haha
a year ago
updated
a year ago
run it back
a year ago
okay that was a syntax error, my bad
a year ago
we will get there in the end lol
a year ago
woohoo
Hey im having a similar issue. I have used railway for lots of project but looks like someof my new dependencies break my happy path.
How can i know what to put in my docker file ( seems like the right path ) to solve this issue?
package -> node-vad
https://www.npmjs.com/package/node-vad
Failed Build Log