esm-bundle / xstream

MIT License
0 stars 0 forks source link

Unit tests fail with symbol-observable #1

Open rajasegar opened 3 years ago

rajasegar commented 3 years ago

After building with yarn build and unit tests fail with the following error

 @esm-bundle/xstream
    1) can load the esm bundle without dying

  0 passing (10ms)
  1 failing

  1) @esm-bundle/xstream
       can load the esm bundle without dying:
     Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/rajasegarchandran/www/xstream/node_modules/symbol-observable/ponyfill' imported from /Users/rajasegarchandran/www/xstream/esm/xstream.js
Did you mean to import symbol-observable/ponyfill.js?
      at finalizeResolution (internal/modules/esm/resolve.js:276:11)
      at moduleResolve (internal/modules/esm/resolve.js:699:10)
      at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:810:11)
      at Loader.resolve (internal/modules/esm/loader.js:85:40)
      at Loader.getModuleJob (internal/modules/esm/loader.js:229:28)
      at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:51:40)
      at link (internal/modules/esm/module_job.js:50:36)

@joeldenning Can you please help?

joeldenning commented 3 years ago

symbol-observable is a dependency of xstream. The error indicates that symbol-observable was not included in the output bundle, but is expected as a runtime dependency. It should probably be included in the bundle. @rollup/plugin-node-resolve might help here. Also check the rollup externals and make sure symbol-observable is not external