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

Uncaught TypeError: r is not a function #32

Open
gusarov opened this issue Oct 28, 2020 · 1 comment
Open

Uncaught TypeError: r is not a function #32

gusarov opened this issue Oct 28, 2020 · 1 comment

Comments

@gusarov
Copy link

gusarov commented Oct 28, 2020

It all works in development mode, but fails in prod, even ng serve --prod

main.3373bd908bf1d098cd2f.js:1 Uncaught TypeError: r is not a function
    at e.createCheckers (main.3373bd908bf1d098cd2f.js:1)
    at Module.zUnb (main.3373bd908bf1d098cd2f.js:1)
    at l (runtime.8fbc2fd6f12647d93e24.js:1)
    at Object.0 (main.3373bd908bf1d098cd2f.js:1)
    at l (runtime.8fbc2fd6f12647d93e24.js:1)
    at t (runtime.8fbc2fd6f12647d93e24.js:1)
    at Array.r [as push] (runtime.8fbc2fd6f12647d93e24.js:1)
    at main.3373bd908bf1d098cd2f.js:1

My code is:

import { UserProfile } from '../_model/userProfile';
import { createCheckers } from 'ts-interface-checker';
const { UserProfile } = createCheckers(todoUserTI, userProfileTI);

and *TI files are generated from the model

"ts-interface-checker": "^0.1.13",
"ts-interface-builder": "^0.2.2",
@dsagal
Copy link
Member

dsagal commented Feb 16, 2021

Did you figure this out? If there is a difference between dev and prod, that seems likely a build-related issue. From your example, I can't tell what todoUserTI and userProfileTI are, but it sounds like in prod they are not what they are supposed to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants