Skip to content

Wrong import #191

Open
Open
@kaaax0815

Description

@kaaax0815

I did not test this, but I think the require calls are wrong.

example:

nativeBinding = require('libsql-darwin-x64')

a package named libsql-darwin-x64 does not exist. the correct name would be @libsql/darwin-x64 but this does not work with @napi-rs/cli

napi-rs expects the name and the arch to be separated by a "-" which is not the current schema.

with a config like

  "napi": {
    "name": "libsql",
    "triples": 
    "package": {
      "name": "@libsql/binding"
    }
  },

the imports would then look like @libsql/binding-darwin-x64

See https://github.com/oxc-project/oxc/tree/main/napi/parser for reference as this has a similar structure to this project

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