process.uptime is not a function
See original GitHub issueNode.js Version: 10.15.3
Operating System: Windows
Steps to Produce Error:
Just including the opossum library in our SSR application causes:
processStartTime.js?43bd:4 Uncaught TypeError: process.uptime is not a function
at Object.eval (processStartTime.js?43bd:4)
at eval (processStartTime.js:30)
at Object.../../packages/bonnet/node_modules/prom-client/lib/metrics/processStartTime.js (client.js:4939)
at __webpack_require__ (client.js:770)
at fn (client.js:130)
at eval (defaultMetrics.js?9dd3:4)
at Object.../../packages/bonnet/node_modules/prom-client/lib/defaultMetrics.js (client.js:4731)
at __webpack_require__ (client.js:770)
at fn (client.js:130)
at eval (index.js?875d:22
)
No actual circuit breaker has been defined yet.
From a new relic post https://discuss.newrelic.com/t/process-uptime-is-not-a-function/65486 It appears there is server-side code being called in our clietn bundle now. Any resolutions?
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (4 by maintainers)
Top Results From Across the Web
nodejs throws TypeError: process.uptime is not a function
It seems that you are creating a react.js application and not a node.js server application. react is front side when node.js is server...
Read more >Node.js process.uptime() Method - GeeksforGeeks
js process is running. Syntax: process.uptime();. Parameters: This method does not accept any parameter. Return Value: It returns a floating ...
Read more >Process | Node.js v19.3.0 Documentation
js process will exit when there is no work scheduled, but a listener registered on the 'beforeExit' event can make asynchronous calls, and...
Read more >process.Process.uptime JavaScript and Node.js code examples
How to use. uptime. function. in. Process ... heartbeatTimeout) { this.logger.warn(`Heartbeat is not received from '${node.id}' node.
Read more >process
process.on('exit', (code) => { // do *NOT* do this setTimeout(() ... Note: this function is only available on POSIX platforms (i.e. not Windows,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Current solution was to roll opossum back to v1.11.0. It works great! Just looking foward to being able to use v2 and above once these metric plugins are externalized. Thanks guys!
@dptoot glad you got things worked out! My PR https://github.com/nodeshift/opossum/pull/350 should land soon, and we’ll be pushing out a 4.0 release shortly afterwards. I’m going to close this issue for now, since you have a workaround, and we have a pending fix.