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.

Any specific reason for requires written as below:

https://github.com/mscdex/ssh2-streams/blob/1845aff4ad1ad086bee1f8612e031d9bea931bb8/lib/keyParser.js#L17

It’ll work perfectly if written just as require('./buffer-helpers') while in dynamic form it raises issues for any static analysis that resolves require chain.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
medikoocommented, Mar 12, 2019

Created PR that ensures static require paths: https://github.com/mscdex/ssh2-streams/pull/124

0reactions
mscdexcommented, Jun 30, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic requires in nodejs before module.exports
Is there a way to have a require at the top, before module.exports to be done dynamically through an if statement or something...
Read more >
How to track down "Dynamic requires are not ... - GitHub
I'm getting "Dynamic requires are not currently supported by rollup-plugin-commonjs" error in the runtime when I bundle and run my actual ...
Read more >
Dynamic Required Fields instead of Validation Rules
We make extensive use of Validation Rules to make certain fields required based on the input of other fields. The single most requested...
Read more >
keywords:dynamic require - npm search
Structure a node project your way with the ability to require models, controllers, or any file dynamically. load · require · dynamic ·...
Read more >
Attentional demands for static and dynamic equilibrium
The present experiment evaluates whether the attentional requirements for a control sitting condition and for standing and walking conditions vary with the ...
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