question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

process.uptime is not a function

See original GitHub issue

Node.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:closed
  • Created 4 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dptootcommented, Aug 13, 2019

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!

0reactions
lancecommented, Aug 13, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found