Skip to content

Non node.js environments have issues building (workers for instance) #507

@antpb

Description

@antpb

Describe the bug

Non node.js environments may have issues building because of some packages and how they are imported.

To Reproduce

Make a worker, include eliza/core and attempt to build. It will throw an error similar to

  ✘ [ERROR] No loader is configured for ".node" files:
  node_modules/@anush008/tokenizers-darwin-universal/tokenizers.darwin-universal.node

      node_modules/@anush008/tokenizers/index.js:116:32:
        116 │ ... nativeBinding = require('@anush008/tokenizers-darwin-universal')

Expected behavior

Build successful

Screenshots

image

PR incoming

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions