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

NewRelic crashes app with symlinked node modules #153

Closed
DavidSouther opened this issue Jun 13, 2014 · 6 comments
Closed

NewRelic crashes app with symlinked node modules #153

DavidSouther opened this issue Jun 13, 2014 · 6 comments

Comments

@DavidSouther
Copy link

While developing a library, NewRelic fails at startup when the library is symlinked for development.

It seems to be recursing infinitely in shimmer.

I narrowed it down to the symlink issue by isolating changing the dependency as a symlink vs cp -r into node modules. Can provide more details to isolate a minimal test case as needed.

module.js:340
    throw err;
          ^
Error: Cannot find module 'coffee-script'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Function.cls_wrapMethod [as _load] (/Users/southerd/devel/southerd/flipflops/node_modules/newrelic/lib/shimmer.js:209:38)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/libraries/stassets/lib/index.js:1:63)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Function.cls_wrapMethod [as _load] (/Users/southerd/devel/southerd/flipflops/node_modules/newrelic/lib/shimmer.js:209:38)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/static/handler.coffee:23:6)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/static/handler.coffee:1:1)
  at Module._compile (module.js:456:26)
  at Object.loadFile (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Function.cls_wrapMethod [as _load] (/Users/southerd/devel/southerd/flipflops/node_modules/newrelic/lib/shimmer.js:209:38)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/server.coffee:27:6)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/server.coffee:1:1)
  at Module._compile (module.js:456:26)
  at Object.loadFile (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Function.cls_wrapMethod [as _load] (/Users/southerd/devel/southerd/flipflops/node_modules/newrelic/lib/shimmer.js:209:38)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/app.js:6:1)
  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)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at loadApplication (/usr/local/Cellar/passenger/4.0.44/libexec/helper-scripts/node-loader.js:118:2)
  at Server.<anonymous> (/usr/local/Cellar/passenger/4.0.44/libexec/node_lib/phusion_passenger/request_handler.js:69:3)
  at Server.g (events.js:180:16)
  at Server.EventEmitter.emit (events.js:92:17)
  at net.js:1055:10
  at process._tickCallback (node.js:419:13)
@groundwater
Copy link
Contributor

Whoah, that's no good.

Can you describe how you symlinked the module into your project? I often use npm link which runs without issue. Are you working from source, or a specific version of the agent?

Thanks!

@DavidSouther
Copy link
Author

This has occured using both npm link and symlinking directly (eg it's any symlinking that seems at fault, not a single or double layer between the two approaches).

The project is:

DavidSouther/flipflops@8c86efc

The library is:

DavidSouther/stassets@acf02bd

You will need to export NEW_RELIC_LICENSE_KEY=keykeykey before running npm start in flip flops.

Note also, as I think more about this, I only tested this in passenger mode. BRB more testing.

@DavidSouther
Copy link
Author

Interesting... this looks like it might be a passenger issue.

@DavidSouther
Copy link
Author

Definitely a passenger issue; New Relic just happened to be the first thing loading!

@DavidSouther
Copy link
Author

module.js:340
    throw err;
          ^
Error: Cannot find module 'coffee-script'
  at Function.Module._resolveFilename (module.js:338:15)
  at Function.Module._load (module.js:280:25)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/libraries/stassets/lib/index.js:1:63)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/static/handler.coffee:23:6)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/static/handler.coffee:1:1)
  at Module._compile (module.js:456:26)
  at Object.loadFile (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/server.coffee:27:6)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/src/server/server.coffee:1:1)
  at Module._compile (module.js:456:26)
  at Object.loadFile (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
  at Module.load (/Users/southerd/devel/southerd/flipflops/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/Users/southerd/devel/southerd/flipflops/app.js:6:1)
  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)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at loadApplication (/usr/local/Cellar/passenger/4.0.44/libexec/helper-scripts/node-loader.js:118:2)
  at Server.<anonymous> (/usr/local/Cellar/passenger/4.0.44/libexec/node_lib/phusion_passenger/request_handler.js:69:3)
  at Server.g (events.js:180:16)
  at Server.EventEmitter.emit (events.js:92:17)
  at net.js:1055:10
  at process._tickCallback (node.js:419:13)

@groundwater
Copy link
Contributor

@DavidSouther thanks for investigating!

bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 19, 2024
Update s3-client semver range to skip 3.192.0
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this issue Apr 23, 2024
Update s3-client semver range to skip 3.192.0
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