Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Strict Mode #46

Closed
winton opened this issue Sep 25, 2013 · 2 comments
Closed

Error in Strict Mode #46

winton opened this issue Sep 25, 2013 · 2 comments

Comments

@winton
Copy link

winton commented Sep 25, 2013

When executing in strict mode (coffeescript default), I got this error:

undefined:1
(function(){return function static(req, res, next){return agent.tracer.callbac
                   ^^^^^^^^^^^^^^^
SyntaxError: Use of future reserved word in strict mode
    at wrapHandle (/Users/wintonwelsh/Sites/gitcycle_api/node_modules/newrelic/lib/instrumentation/connect.js:72:70)
    at HTTPServer.<anonymous> (/Users/wintonwelsh/Sites/gitcycle_api/node_modules/newrelic/lib/instrumentation/connect.js:94:26)
    at HTTPServer.app.use (/Users/wintonwelsh/Sites/gitcycle_api/node_modules/express/lib/http.js:231:36)
    at HTTPServer.<anonymous> (/Users/wintonwelsh/Sites/gitcycle_api/lib/app.js:163:7)
    at HTTPServer.app.configure (/Users/wintonwelsh/Sites/gitcycle_api/node_modules/express/lib/http.js:543:61)
    at Object.<anonymous> (/Users/wintonwelsh/Sites/gitcycle_api/lib/app.js:162:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Pull request coming soon.

winton added a commit to winton/node-newrelic that referenced this issue Sep 25, 2013
@winton winton closed this as completed Sep 25, 2013
@othiym23
Copy link
Contributor

This is actually an issue! Since that file is itself set to run in strict mode, there's no way to get static and other reserved future keywords through the agent. New Relic does need the behavior described in wrapHandle's documentation, so I think we're going to have to blacklist reserved future keywords and mangle their names.

@othiym23
Copy link
Contributor

This is fixed in 8a317f5.

@winton, can you confirm that coffee is no longer throwing?

cmcadams-newrelic pushed a commit to cmcadams-newrelic/node-newrelic that referenced this issue Jan 29, 2024
messaging-app: update links to remove docs/ path component
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this issue Apr 11, 2024
 Adds additional dependency language to bottom of third party notices
bizob2828 referenced this issue in bizob2828/node-newrelic Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants