Skip to content

Native modules into pkg #5130

Closed as not planned
Closed as not planned

Description

@Eldionadvantx

Node.js Version

v18.5.0

NPM Version

n9.0.2

Operating System

linux x64 or arm64 or windows

Subsystem

Other

Description

./bin/smart-api-linux-x64
pkg/prelude/bootstrap.js:1872
throw error;
^

Error: No native build was found for platform=linux arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.5.0
loaded from: /snapshot/smart-api/node_modules/@serialport/bindings-cpp

at Function.<anonymous> (/snapshot/smart-api/node_modules/node-gyp-build/node-gyp-build.js:60:9)
at load (/snapshot/smart-api/node_modules/node-gyp-build/node-gyp-build.js:22:30)
at Object.<anonymous> (/snapshot/smart-api/node_modules/@serialport/bindings-cpp/dist/serialport-bindings.js:10:48)
at Module._compile (pkg/prelude/bootstrap.js:1926:22)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at Module.require (pkg/prelude/bootstrap.js:1851:31)
at require (node:internal/modules/cjs/helpers:102:18)

Node.js v18.5.0 Hello, thanks in advance., any idea how to handle this so the node project converts into a .bin file so when deployed the source code isn't present in server that is deployed?

Minimal Reproduction

No response

Output

./bin/smart-api-linux-x64
pkg/prelude/bootstrap.js:1872
throw error;
^

Error: No native build was found for platform=linux arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.5.0
loaded from: /snapshot/smart-api/node_modules/@serialport/bindings-cpp

at Function.<anonymous> (/snapshot/smart-api/node_modules/node-gyp-build/node-gyp-build.js:60:9)
at load (/snapshot/smart-api/node_modules/node-gyp-build/node-gyp-build.js:22:30)
at Object.<anonymous> (/snapshot/smart-api/node_modules/@serialport/bindings-cpp/dist/serialport-bindings.js:10:48)
at Module._compile (pkg/prelude/bootstrap.js:1926:22)
at Module._extensions..js (node:internal/modules/cjs/loader:1166:10)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:834:12)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at Module.require (pkg/prelude/bootstrap.js:1851:31)
at require (node:internal/modules/cjs/helpers:102:18)

Node.js v18.5.0

Before You Submit

  • I have looked for issues that already exist before submitting this
  • My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask

Activity

  1. avivkeller commented on Feb 26, 2026

    @avivkeller
    Member

    This is an issue with a specific package, and not Node.js's core. Please refer to that package's help guides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions