Giter Club home page Giter Club logo

heroku-nodejs-plugin's Introduction

We've moved!

Hello. This repository is no longer in use and has been archived for historical purposes.

The native addon for Node.js metrics collection that was previously here has been replaced with a plugin that uses performance APIs built directly into Node.js. This new plugin is now bundled with the heroku/nodejs buildpack.

heroku-nodejs-plugin's People

Contributors

alexmuller avatar colincasey avatar danielleadams avatar dependabot[bot] avatar edmorley avatar jmorrell avatar joshwlewis avatar mgomes avatar snyk-bot avatar thebanjomatic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-nodejs-plugin's Issues

Logging for unsupported Node versions

Issue

If an app starts using a new Node version that is not yet supported by the Node metrics plugin, Node metrics silently disables metrics without explaining why.

Expected

There should be some logging that advises the user that the Node version is unsupported and metrics will be disabled. (Also, more closely released versions with plugins would be helpful, but we should still let the user know in that timeframe)

Add support for Node 15

We support Node 15 at the buildpack level, so it makes sense our metrics plugin supports it as well. Creating an issue to track that support.

(aside: currently, unsupported versions see the plugin silently skip installation, leaving the customer to ponder what happened.)

"ERR_REQUIRE_ESM" when using native modules

Having an app running Node v14.3 and using modules by "type" set to "modules" in package.json seems to throw an error after enabling runtime-heroku-metrics:

app[web.2]: internal/modules/cjs/loader.js:1216
app[web.2]: throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
app[web.2]: ^
app[web.2]:
app[web.2]: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /app/.heroku/heroku-nodejs-plugin/index.js
app[web.2]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1216:13)
app[web.2]: at Module.load (internal/modules/cjs/loader.js:1049:32)
app[web.2]: at Function.Module._load (internal/modules/cjs/loader.js:937:14)
app[web.2]: at Module.require (internal/modules/cjs/loader.js:1089:19)
app[web.2]: at Module._preloadModules (internal/modules/cjs/loader.js:1345:12)
app[web.2]: at loadPreloadModules (internal/bootstrap/pre_execution.js:439:5)
app[web.2]: at prepareMainThreadExecution (internal/bootstrap/pre_execution.js:71:3)
app[web.2]: at internal/main/run_main_module.js:7:1 {
app[web.2]: code: 'ERR_REQUIRE_ESM'
app[web.2]: }

The app crashes and cannot start due to:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /app/.heroku/heroku-nodejs-plugin/index.js

(Perhaps this should have been posted to heroku-build-pack-nodejs)

Plugin does not work with Node worker threads

Referring to the issue that was opened here: heroku/heroku-buildpack-nodejs#727. Opening an issue here to track any conversation and fixes.

Node Metrics as they are currently implemented on Heroku prevents Node worker threads from working. The error will appear as Module did not self-register.

The current best work around is to disable the Node Metrics. You can do this by running heroku labs:disable nodejs-language-metrics -a APP_NAME or doing it from the Heroku Dashboard (as pictured in the original issue: heroku/heroku-buildpack-nodejs#727 (comment)).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.