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

Fix Typescript UMD global error #125

Merged
merged 2 commits into from
Jun 12, 2019
Merged

Fix Typescript UMD global error #125

merged 2 commits into from
Jun 12, 2019

Conversation

trevor-atlas
Copy link
Contributor

When trying to use this package with newer versions of typescript an error is generated (see below)
This PR adds the missing import which resolves the problem!

node_modules/react-native-material-bottom-navigation/index.d.ts:58:49 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

58   export default class BottomNavigation extends React.Component<
                                                   ~~~~~

node_modules/react-native-material-bottom-navigation/index.d.ts:61:32 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

61   export class IconTab extends React.Component<IconTabProps> {}
                                  ~~~~~

node_modules/react-native-material-bottom-navigation/index.d.ts:62:32 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

62   export class FullTab extends React.Component<FullTabProps> {}
                                  ~~~~~

node_modules/react-native-material-bottom-navigation/index.d.ts:63:36 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

63   export class ShiftingTab extends React.Component<FullTabProps> {}
                                      ~~~~~

node_modules/react-native-material-bottom-navigation/index.d.ts:64:30 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

64   export class Badge extends React.Component<BadgeProps> {}

@trevor-atlas
Copy link
Contributor Author

I'd like to point out that the tests actually pass and the failure is due to the CI:

Test Suites: 10 passed, 10 total
Tests:       59 passed, 59 total
Snapshots:   0 total
Time:        10.602s
Ran all test suites.
Error: you must supply a CC_TEST_REPORTER_ID ENV variable or pass it via the -r flag
Usage:
  cc-test-reporter after-build [flags]

@timomeh
Copy link
Owner

timomeh commented Jun 12, 2019

Thank you! CI reports an error, but the tests are still green, it's just the codeclimate-connection. I'll fix it.

@timomeh
Copy link
Owner

timomeh commented Jun 12, 2019

Ah, I found it: CircleCI doesn't apply secret env vars in PR builds.

I fixed the circleci config. Could you please rebase/merge the current master into your branch? I'd like to see if that solves the failing build.

@timomeh timomeh merged commit 420b524 into timomeh:master Jun 12, 2019
@timomeh
Copy link
Owner

timomeh commented Jun 12, 2019

Published in v1.0.4 🚀

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

2 participants