trackjs / trackjs-node Goto Github PK
View Code? Open in Web Editor NEWTrackJS Error Monitoring agent for NodeJS
Home Page: https://trackjs.com/
License: Other
TrackJS Error Monitoring agent for NodeJS
Home Page: https://trackjs.com/
License: Other
Versions:
"trackjs-node": "1.0.1",
"@angular/core": "^14.0.0",
I can't serve my app because of this:
./node_modules/trackjs-node/dist/watchers/NetworkWatcher.js:13:16-38 - Error: Module not found: Error: Can't resolve '_http_agent' in '{userlocation}\node_modules\trackjs-node\dist\watchers'
I want to use trackjs-node in our ssr react app server side code and it throws errors.
I found the same error info in the previous closed issue. But there is no solution and just suggest to use browser package.
versions:
"trackjs-node": "1.0.1",
"node": 16.16.0,
"react": 18.2.0
errors:
ERROR in ../../node_modules/.pnpm/[email protected]/node_modules/trackjs-node/dist/watchers/NetworkWatcher.js 7:16-38
Module not found: Error: Can't resolve '_http_agent' in '/Users/ccui/Dev/wpt-cms-unification/node_modules/.pnpm/[email protected]/node_modules/trackjs-node/dist/watchers'
Instead of the deprectated domain
concept, in Node v14+ we can store our agent instance in the asyncLocalStorage object.
https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage
The request context, such as the URL, method, and metadata, is not included on errors captured from rejected promises.
This is cased by nodejs/node#29051 and nodejs/node#26794, which prevents promise.domain
from being included in the onUnhandledRejection
event. This started as of NodeJS v12.0.0, and is still occurring as of v13.5.0.
I am unaware of how to workaround this limitation.
We've recorded various faults from the internal operations indicating a failure when discovery environmental dependencies. This appears to be caused by security settings preventing us from accessing the shell, or mangling the response in some way.
Some examples:
**msg:**Unexpected end of JSON input
**stack:**SyntaxError: Unexpected end of JSON input at JSON.parse () at /Users/REDACTED/Projects/REDACTED/node_modules/trackjs-node/dist/Environment.js:31:43 at Array.forEach () at /Users/REDACTED/Projects/REDACTED/node_modules/trackjs-node/dist/Environment.js:30:25 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:85:5) **url: a:**trackjs-node **v:**0.0.11 **h:**4de2b2772dd850249087ccef36efec78039c23ca
┌──────────────────────────────────────────────────────────────────┐ │ npm update check failed │ │ Try running with sudo or get access │ │ to the local update config store via │ │ sudo chown -R |
Other |
---|
These appear to be caused by this code:
https://github.com/TrackJs/TrackJS-Node/blob/master/src/Environment.ts#L41
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.