PostHog / posthog.com

Official docs, website, and handbook for PostHog.
https://posthog.com
Other
417 stars 421 forks source link

Handbook feedback on: Developing locally #3525

Open deepakimperative opened 2 years ago

deepakimperative commented 2 years ago

While creating an instance over Centos Machine after starting the server using ./bin/start we are facing below issue. Please suggest

Error: /maalogs/posthog/posthog/plugin-server/node_modules/re2/build/Release/re2.node: undefined symbol: _ZTTNSt7cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE at Module._extensions..node (node:internal/modules/cjs/loader:1189:18) at Object.nodeDevHook [as .node] (/maalogs/posthog/posthog/plugin-server/node_modules/ts-node-dev/lib/hook.js:63:13) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (/maalogs/posthog/posthog/plugin-server/node_modules/re2/re2.js:3:13) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module._compile (/maalogs/posthog/posthog/plugin-server/node_modules/source-map-support/source-map-support.js:547:25) at Module._extensions..js (node:internal/modules/cjs/loader:1159:10) [DEBUG] 14:11:02 Child error [ERROR] 14:11:02 Error: /maalogs/posthog/posthog/plugin-server/node_modules/re2/build/Release/re2.node: undefined symbol: _ZTTNSt7cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE [DEBUG] 14:11:02 Disconnecting from child [DEBUG] 14:11:02 Sending SIGTERM kill to child pid 128530 Child got SIGTERM, exiting. [DEBUG] 14:11:02 Child exited with code 0

(env) user[TYPEGEN] yarn run typegen:watch exited with code SIGINT [ESBUILD] yarn start-http exited with code SIGINT

Twixes commented 2 years ago

Hey! Looks like the re2 package can't find the re2 library in the system. Can you check if installing the library with sudo yum -y install re2 fixes ./bin/start? (You might also have to remove the node_modules/ directory in posthog/plugin-server/) BTW, will you definitively be using that instance of PostHog just for developing PostHog? Just in case you'd like to do actual analytics besides development, for production environments we only support containerized deployments (options listed on https://posthog.com/docs/self-host).