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

Other: can't successfully start node app on a server #166

Open
B-R-Bender opened this issue Aug 14, 2024 · 2 comments
Open

Other: can't successfully start node app on a server #166

B-R-Bender opened this issue Aug 14, 2024 · 2 comments

Comments

@B-R-Bender
Copy link

About me

Hello! I'm just a developer :)

Issue

I'm trying to build a simple controller for my ATEM. On a dev computer it looks like it works, but when I build it and deployed to a server. When I run my script it can see this in the output:

Error: Failed to find binding for freetype2
Tried paths:

  • /home/www/dv2/services/services-test/build/Debug/freetype2.node
  • /home/www/dv2/services/services-test/build/Release/freetype2.node
  • /home/www/dv2/services/services-test/prebuilds/freetype2-linux-x64/node-napi-v7.node
    at p (/home/www/dv2/services/services-test/main.js:2:261957)
    at h (/home/www/dv2/services/services-test/main.js:2:262060)
    at Object.4387 (/home/www/dv2/services/services-test/main.js:2:1974)
    at webpack_require (/home/www/dv2/services/services-test/main.js:2:353533)
    at Object.3278 (/home/www/dv2/services/services-test/main.js:2:229023)
    at webpack_require (/home/www/dv2/services/services-test/main.js:2:353533)
    at Object.6146 (/home/www/dv2/services/services-test/main.js:2:2278)
    at webpack_require (/home/www/dv2/services/services-test/main.js:2:353533)
    at Object.9765 (/home/www/dv2/services/services-test/main.js:2:219922)
    at webpack_require (/home/www/dv2/services/services-test/main.js:2:353533)

to me it looks like there is something with freetype2 on a server but maybe I'm missing something, so can you please share your thoughts.

Thanks in advance

@Julusian
Copy link
Member

This library uses another library called 'freetype2' to do some text rendering, and as you have discovered, webpack doesn't understand and copy the precompiled component of this when bundling.

You will need to make sure that after your webpack build, you make the file it is looking for at /home/www/dv2/services/services-test/prebuilds/freetype2-linux-x64/node-napi-v7.node available to it. Inside of your node_modules, will be a package @julusian/freetype2 which contains the prebuilds/freetype2-linux-x64/node-napi-v7.node file that you need to distribute.

@B-R-Bender
Copy link
Author

Thank you for a quick answer!
I'll try and let you know if something will go wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants