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.

Dependencies are excluded in output when a duplicate function exists

See original GitHub issue

- Do you want to request a feature or report a bug? Bug

- What is the current behavior? When a duplicate function exists, dependencies are not included in the resulting zip file.

- If the current behavior is a bug, please provide the steps to reproduce. Create the following two files:

foo.js:

require("./bar");

function foo() {}
function foo() {}

module.exports = foo;

bar.js:

console.log("hello from bar");

Then run netlify build.

- What is the expected behavior? bar.js should get bundled in the zip file for foo.js, but it doesn’t.

If you remove the duplicate foo function, it gets bundled as expected.

If you run DEBUG=* netlify build, you’ll see this in the output:

precinct could not parse content: Identifier 'foo' has already been declared (4:9)

- Please mention your node.js, and operating system version. Node v12.20.0, MacOS 10.15.7

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
russelldaviscommented, Feb 1, 2021

Turns out there’s already an issue for that: https://github.com/dependents/node-precinct/issues/68

0reactions
ehmickycommented, Feb 1, 2021

Thanks for investigating this @russelldavis! Would you like to create this issue in node-precinct and link it in the current issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exclude all transitive dependencies of a single dependency
The problem with this approach is that I have to do this for every transitive dependency contributed by sample-artifactB . Is there a...
Read more >
How to Resolve a Version Collision of Artifacts in Maven
First, we explored an example of a version collision in a multi-module project. Then, we showed how to exclude transitive dependencies in the ......
Read more >
Apache Maven Dependency Plugin – Usage
Dependencies can be included or excluded by a list of types. See unpack-dependencies for details. The artifacts can be unpacked in subfolders ...
Read more >
Customizing resolution of a dependency directly
Using module replacement rules · Declare exclusion rule to avoid pulling in google-collections to graph. It is probably the most popular approach. ·...
Read more >
Dependencies analysis | IntelliJ IDEA Documentation - JetBrains
Dependencies analysis results shown in the tool window ... Module dependencies analysis shows all modules that exist in the specified scope, ...
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