curlconverter / curlconverter

Transpile curl commands into Python, JavaScript and 27 other languages
https://curlconverter.com
MIT License
7.18k stars 871 forks source link

Error: Error relocating /app/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node: _ZN2v86Object16SetInternalFieldEiNS_5LocalINS_4DataEEE: symbol not found` #658

Open agniokas opened 2 weeks ago

agniokas commented 2 weeks ago

I have nextjs project and want to host a curlconverter in some pages. The project works on local machine, but i had to push tree-sitter.wasm and tree-sitter-bash.wasm files to each .netx/static/chunks/pages/page for it to work, even if the page wouldn't have curlconverter in it. However when when build with docker it gives error "Error: Error loading shared library /app/node_modules/tree-sitter/build/Release/tree_sitter_runtime_binding.node: Exec format error`" and "Failed to load resource: the server responded with a status of 502 ()"

Has anyone encountered similar issue and could help solving it?

My Dockerfile: FROM node:18-alpine WORKDIR /app COPY ./.next/standalone . COPY ./public ./public COPY ./.next/static ./.next/static ENV NEXT_SHARP_PATH=/app/node_modules/sharp ENTRYPOINT ["node"] CMD ["server.js"]