DavidWells / analytics

Lightweight analytics abstraction layer for tracking page views, custom events, & identifying visitors
https://getanalytics.io
MIT License
2.46k stars 244 forks source link

Issue setting up the project locally to contribute a plugin #449

Closed aonawale closed 1 month ago

aonawale commented 2 months ago

I am trying to create a new plugin following the contributing guide here https://github.com/aonawale/analytics/blob/master/CONTRIBUTING.md. I started by installing pnpm globally using npm install -g pnpm because it is the package manager used by the analytics project.

First issue The npm run setup command failed while installing with this error nan_callbacks.h:55:23: error: ‘AccessorSignature’ is not a member of ‘v8’ #942. I managed to get the installation to complete by following the recommendation here https://github.com/nodejs/nan/issues/942#issuecomment-1816080121.

Second issue After the npm run setup command ran successfully, I ran the next command npm run build the I got another error  ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  analytics@0.8.14 prebuild: "npm run clean && npm run types"

Node version: v20.11.0 NPM version: 10.2.4 PNPM version: 9.9.0

Screenshot 2024-08-28 at 17 24 07
DavidWells commented 2 months ago

Hey there. Yeah there might be some weird stuff with the build in newer versions of node or pnpm 😅

Try running with node v16 and/or pnpm 8.7.6

Just tested this out with v16.20.2 and builds work. (pnpm v8.7.6)

Haven't had time to debug dev deps and update the pipeline for newer versions of node/pnpm.