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.

Issue with duplicate names for .Node files (packaging .Node files with distribution)

See original GitHub issue

I’m currently working through an issue with utilizing ref-napi & ffi-api and bundling an executable for Windows where there are two .Node files I need packaged that have the same name.

> pkg@4.4.9
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\ref-napi\prebuilds\win32-x64\electron.napi.node
  %2: path-to-executable/electron.napi.node
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\ref-napi\prebuilds\win32-x64\node.napi.node
  %2: path-to-executable/node.napi.node
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\ffi-napi\prebuilds\win32-x64\electron.napi.node
  %2: path-to-executable/electron.napi.node
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\ffi-napi\prebuilds\win32-x64\node.napi.node
  %2: path-to-executable/node.napi.node
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\os-service\build\Release\service.node
  %2: path-to-executable/service.node
> Warning Cannot include addon %1 into executable.
  The addon must be distributed with executable as %2.
  %1: ...\project\node_modules\iconv\build\Release\iconv.node
  %2: path-to-executable/iconv.node

The problem is that I cannot differentiate the \ref-napi\prebuilds\win32-x64\node.napi.node file and the \ffi-napi\prebuilds\win32-x64\node.napi.node file. This is causing me to be unable to package up my distribution.

I’m working through the issue, but saw no solution to this problem in the docs. If I get an update I’ll be certain to update it here and provide a resolution path, but thought the pkg community may have an idea how to get over this hurdle.

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
robertsLandocommented, May 12, 2022

PR?

1reaction
shvccommented, May 12, 2022

any plan to resolve this issue? I really need this feat

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicate name feature like file system - node.js - Stack Overflow
I am trying to do something like file system of our computer in which if file name "test" is presented in one folder...
Read more >
You should never ever run directly against Node.js in ...
We would run this with a start script in the package.json file. ... Our other problem is that we're still running directly against...
Read more >
Building an NPM Package - Notes, Tips, and Troubleshooting
In general, it seems like Node and NPM still have a big problem with nested source file resolution, even when package.main and/or ...
Read more >
SCons 4.1.0
The problem with specifying the names as strings is that our SConstruct file is no longer portable across operating systems. It won't, for...
Read more >
node-gyp | Yarn - Package Manager
node -gyp - Node.js native addon build tool · Features · Installation · How to Use · The binding.gyp file · Further reading...
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