marblejs / marble

Marble.js - functional reactive Node.js framework for building server-side applications, based on TypeScript and RxJS.
https://marblejs.com
MIT License
2.15k stars 69 forks source link

Cannot find module 'rxjs/internal/scheduler/AsyncScheduler' from 'node_modules/@marblejs/core/dist/effects/effectsContext.factory.js' when running jest #339

Closed alvarorodriguezestruch closed 3 years ago

alvarorodriguezestruch commented 3 years ago

Describe the bug Im triying to create some test to a project with jest and im using marblejs for building the server. The point is that there is no problem when im running the code, but when I try to execute any file with jest which require the @marblejs/core module or any file that internally imports it, its returns the following error:

Cannot find module 'rxjs/internal/scheduler/AsyncScheduler' from 'node_modules/@marblejs/core/dist/effects/effectsContext.factory.js'

    Require stack:
      node_modules/@marblejs/core/dist/effects/effectsContext.factory.js
      node_modules/@marblejs/core/dist/http/server/http.server.js
      node_modules/@marblejs/core/dist/index.js
      utils.helper.js
      utiles.test.js

Im not sure if this is a marblejs bug or maybe a jest bug, but i will appreciate any help to discover it.

To Reproduce I have create a stackblitx for it, just run jest command https://stackblitz.com/edit/node-sbtfbd?file=utils.test.js

Expected behavior The test fails because my own mistake :)

Desktop (please complete the following information):

JozefFlakus commented 3 years ago

@marblejs v3.5 is not compatible with latest RxJS v7. Closing due to a duplicate of: https://github.com/marblejs/marble/issues/324

JozefFlakus commented 3 years ago

Marble.js v4 with a support to RxJS v7 will be released soon. :)

alvarorodriguezestruch commented 3 years ago

downgrading rxjs to 6.6.7 until v4 get released, solves the problem.

thanks for quick response! :)