Skip to content

[TS] Build completes but outputs node-resolve related error and exits with error code. #437

Description

@joaolucasl

Context

I'm trying to build a new typescript project with microbundle and, although the build completes (there are files in dist/), I get the error indicated below.

Running on:

System Version: macOS 10.14.5 (18F132)
Kernel Version: Darwin 18.6.0
NodeJS: v8.9.4

You can find the sample code for reproduction here:
https://gist.github.com/joaolucasl/3598ba6eb6f3d6f443c87916bc8c24bb

Evidences

When I try to build it as a Typescript project

LukeMacbookPro:mongoose-notekeeper-plugin luke$ npx microbundle
node-resolve: setting options.module is deprecated, please override options.mainFields instead
node-resolve: setting options.jsnext is deprecated, please override options.mainFields instead
node-resolve: setting options.module is deprecated, please override options.mainFields instead
node-resolve: setting options.jsnext is deprecated, please override options.mainFields instead
node-resolve: setting options.module is deprecated, please override options.mainFields instead
node-resolve: setting options.jsnext is deprecated, please override options.mainFields instead
dyld: lazy symbol binding failed: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
  Referenced from: /Users/luke/Code/mongoose-notekeeper-plugin/node_modules/iltorb/build/bindings/iltorb.node
  Expected in: flat namespace

dyld: Symbol not found: __ZN4node19GetCurrentEventLoopEPN2v87IsolateE
  Referenced from: /Users/luke/Code/mongoose-notekeeper-plugin/node_modules/iltorb/build/bindings/iltorb.node
  Expected in: flat namespace

Abort trap: 6
LukeMacbookPro:mongoose-notekeeper-plugin luke$ 

If I remove convert the file to plain JS:

LukeMacbookPro:mongoose-notekeeper-plugin luke$ npx microbundle
Build "mongooseNotekeeperPlugin" to dist:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions