Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

New Relic on Electron NodeJS


#1

Hi there,

I am trying to insert new relic on Electron NodeJS application.

When I insert require(‘newrelic’); on main.js and compile the error below is shown:

A JavaScript error occurred in the main process
Uncaught Exception:
TypeError: Cannot read property ‘logicalProcessors’ of undefined
at factMapCb (/Users/Projects/Desktop/node_modules/newrelic/lib/collector/facts.js:22:39)
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:3874:9
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:473:16
at iterateeCallback (/Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:976:17)
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:958:16
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:3871:13
at onRefreshFinish (/Users/Projects/Desktop/node_modules/newrelic/lib/environment.js:503:7)
at onPackageComplete (/Users/Projects/Desktop/node_modules/newrelic/lib/environment.js:401:14)
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:3874:9
at /Users/Projects/Desktop/node_modules/newrelic/node_modules/async/dist/async.js:473:16

Can New Relic be used on Electron project??

Thanks a lot!


#2

Hi @eduardo.almeida,

At the moment we don’t specifically support Electron. In principle the Node.js agent should work with any Node.js web application that meets the requirements, however since Electron is intended for building desktop applications it may not be compatible with the Node.js agent.

If you are interested in digging into this further, the Node.js agent is publicly available on our GitHub repository: https://github.com/newrelic/node-newrelic


#3

@eduardo.almeida I wanted to let you know that the newest release of the Node agent, v2.7.0, fixed the issue you were seeing where this error was being generated when it shouldn’t be. Thanks to Jarred Filmer (@BrighTide) for the fix!


#4

Thanks a lot!!! I will test it and let you know the results!!


#5

Hey @eduardo.almeida! We are eager to hear back from you about the awesome fix that was provided! Let us know once you were able to give it a go! :blush: