Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@cycle/time 0.9.1 Cannot find module './src/mock-time-source' from 'rxjs.js' #672

Open
evenchange4 opened this issue Aug 31, 2017 · 2 comments

Comments

@evenchange4
Copy link
Contributor

evenchange4 commented Aug 31, 2017

Code to reproduce the issue:

There is a problem of module resolution when I update @cycle/time from ^0.8.0 to ^0.9.1:

// error occurred
import { mockTimeSource } from '@cycle/time/rxjs'
 ● Test suite failed to run
   Cannot find module './src/mock-time-source' from 'rxjs.js'
     at Resolver.resolveModule (../../node_modules/jest-resolve/build/index.js:179:17)
     at Object.<anonymous> (../../node_modules/@cycle/time/rxjs.js:7:26)

Workaround

Should I use the rxjs.js file with specific path?

// work!
import { mockTimeSource } from '@cycle/time/lib/rxjs'
import { timeDriver } from '@cycle/time/lib/es6/rxjs'
@Widdershin
Copy link
Member

Hi @evenchange4

Thanks for the issue!

This is an unintended consequence of the way the monorepo compiles packages. All code is outputted directly to the lib directory.

Previously I ran an additional compile step to ensure that rxjs.js and most.js were present in the root of the compiled package.

I would recommend your workaround in the meantime, and I'll chat to @staltz and @jvanbruegge to see if there's a way we can set this up so you can continue to import as before.

jvanbruegge added a commit that referenced this issue Aug 31, 2017
jvanbruegge added a commit that referenced this issue Aug 31, 2017
jvanbruegge added a commit that referenced this issue Sep 5, 2017
jvanbruegge added a commit that referenced this issue Sep 5, 2017
jvanbruegge added a commit that referenced this issue Oct 3, 2017
@jvanbruegge jvanbruegge self-assigned this Oct 3, 2017
@jvanbruegge jvanbruegge added this to In progess in jvanbruegge's pipeline Oct 3, 2017
jvanbruegge added a commit that referenced this issue Oct 10, 2017
@jvanbruegge jvanbruegge moved this from In progess to Short term TODO in jvanbruegge's pipeline Aug 23, 2018
@IssueHuntBot
Copy link

@issuehuntfest has funded $40.00 to this issue. See it on IssueHunt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment