Scale3-Labs / langtrace-typescript-sdk

Langtrace SDK for NodeJS Applications
https://langtrace.ai
Apache License 2.0
4 stars 5 forks source link

Module not found: Can't resolve imported dependency "async_hooks" #135

Closed sonicviz closed 3 months ago

sonicviz commented 4 months ago
App •  ERROR  •  UI  in ./node_modules/@opentelemetry/context-async-hooks/build/src/AsyncHooksContextManager.js

Module not found: Can't resolve imported dependency "async_hooks"
Did you forget to install it? You can run: npm install --save async_hooks

App •  COMPILATION FAILED  • Please check the log above for details.

Is this useable in a Javascript project? Tried installing in a Quasar js app and get the above error on compile, after successful install of import * as Langtrace from '@langtrase/typescript-sdk'

karthikscale3 commented 4 months ago

Hey @sonicviz , thanks for reaching out and apologies for the delay in response. Let me take a look and get back to you

rohit-kadhe commented 4 months ago

Hi @sonicviz thanks for trying out Langtrace. Currently the SDK is only supported on Node.js and won't work on browser side code. If you are using Node.js for your backend try installing the SDK there and it should work. If you face any issues let us know and we would be more than happy to help.