snowplow-javascript-tracker icon indicating copy to clipboard operation
snowplow-javascript-tracker copied to clipboard

NodeJS 16 support for @snowplow/node-tracker

Open zsolt-anyvan opened this issue 1 year ago • 6 comments

Is it in the future plans to make the @snowplow/node-tracker package compatible with Node16?

zsolt-anyvan avatar Aug 16 '23 10:08 zsolt-anyvan

Hey @zsolt-anyvan, based on the APIs that are used in the tracker, I believe the package will work for Node.js 16 as well. Did you run into any issues trying to run it in this version ?

igneel64 avatar Aug 16 '23 10:08 igneel64

@zsolt-anyvan Just following this one up. Did you run into any issues running on Node 16?

miike avatar Sep 12 '23 02:09 miike

I can confirm, after doing npm install having the "@snowplow/node-tracker": "^3.14.0", added in my packages I faced dependency issues after starting up the server

 ERROR  Failed to compile with 6 errors                                                  friendly-errors 14:48:50

These dependencies were not found:                                                       friendly-errors 14:48:50
                                                                                         friendly-errors 14:48:50
* dns in ./node_modules/cacheable-lookup/source/index.js                                 friendly-errors 14:48:50
* http2 in ./node_modules/http2-wrapper/source/index.js                                  friendly-errors 14:48:50
* net in ./node_modules/got/dist/source/core/utils/timed-out.js, ./node_modules/http2-wrapper/source/utils/calculate-server-name.js
* tls in ./node_modules/http2-wrapper/source/agent.js, ./node_modules/resolve-alpn/index.js
                                                                                         friendly-errors 14:48:50
To install them, you can run: npm install --save dns http2 net tls                       friendly-errors 14:48:50

zsolt-anyvan avatar Sep 13 '23 12:09 zsolt-anyvan

Thanks for the report @zsolt-anyvan , we will check this out. In the meantime can you provide a codesandbox with the issue ?

igneel64 avatar Sep 13 '23 14:09 igneel64

I could not reproduce the issue on codesandbox.

What I can see in the dependencies of $snowplow/node-tracker there is: "got": "^11.8.5", Which is causing the import issues I shared above. Is there any plans to switch that dependency to use got version 13.0.0 ?

zsolt-anyvan avatar Sep 14 '23 09:09 zsolt-anyvan

Hey @zsolt-anyvan , I am trying to reproduce the issue you posted above but with no success. It also seems that the issue you face is not a tracker dependency issue since these modules have not been removed in latest Node versions. Can you provide more info about your stack and where are you trying to install these modules ? (These errors seem to me that they might related to your bundler looking for browser, not Node, packages which do not exist)

igneel64 avatar Sep 18 '23 06:09 igneel64