Uncaught TypeError is not a function
See original GitHub issueHi, thank you for this library, unfortunately I have problems with integrating it. Here is a simple component
export class Logout extends React.Component<ILogoutProps> {
@resolve(USE_CASE_SERVICE_TYPES.AUTH_USE_CASE_HANDLER)
private authUseCase;
......
}
Firstly, I have an error inside IDE

I have provided an inversify container as follows
const render = Component =>
ReactDOM.render(
<ErrorBoundary>
<AppContainer>
<DiProvider container={getRootDiContainer()}>
<Provider store={store}>
<div>
{/* If this slows down the app in dev disable it and enable when required */}
{devTools}
<Component/>
</div>
</Provider>
</DiProvider>
</AppContainer>
</ErrorBoundary>,
rootEl
);
render(AppComponent);
Unfortunately when I try to run application I get the next error
Uncaught TypeError: inversify_react__WEBPACK_IMPORTED_MODULE_4___default(...) is not a function
at logout.tsx:12
at Module.<anonymous> (logout.tsx:33)
at Module../src/main/webapp/app/modules/login/logout.tsx (logout.tsx:42)
at __webpack_require__ (bootstrap:787)
at fn (bootstrap:150)
at Module.<anonymous> (routes.tsx:1)
at Module../src/main/webapp/app/routes.tsx (routes.tsx:46)
at __webpack_require__ (bootstrap:787)
at fn (bootstrap:150)
at Module.<anonymous> (app.scss?d624:45)
client:77
What could be wrong with my configuration?
Thank you so much.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
A typographical error in a function call. · Missing script library. · When a function is called on a property that is not...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >Uncaught TypeError: 'undefined' is not a function
Uncaught TypeError: 'undefined' is not a function. This is a common JavaScript error that happens when you try to call a function before...
Read more >Uncaught Typeerror: $ Is Not a Function | Career Karma
TypeErrors can be thrown at you when attempting to modify an unchangeable value or when using a value in an inappropriate way. The...
Read more >'X' is not a function TypeError in React [Solved] | bobbyhadz
The React.js "Uncaught TypeError: X is not a function" occurs when we try to call a value that is not a function as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Actually I think i see what the issue is - any chance you are doing
import resolve from 'inversify-react'instead ofimport { resolve } from 'inversify-react'?Happy to help 😃