question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'apply' of undefined

See original GitHub issue

Following instructions cannot get package to work I get the error below: TypeError: Cannot read property ‘apply’ of undefined at WithStyles.componentWillMount

import withStyles from 'isomorphic-style-loader/lib/withStyles';
import style from './style.js';

const App = () => <div>Test</div>;
export default withStyles(style)(App);

style.css

body
  background-color: #f00

postcss.config.js

module.exports = {
  parser: 'sugarss',
  plugins: {}
}

webpack.config.js

loaders: [
........
{
        test: /\.css$/,
        use: [
          'isomorphic-style-loader',
          {
            loader: 'css-loader',
            options: {
              importLoaders: 1
            }
          },
          'postcss-loader',
        ]
      },
..........

Let me know how i can resolve this might be something wrong with my set up?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:8
  • Comments:14

github_iconTop GitHub Comments

7reactions
pricetulacommented, Sep 6, 2017

is it possible you could show me a repo for simple example…thanks @ksankaran

2reactions
dleiteecommented, Oct 25, 2017

hey @Vusluk , I don’t understand from where this line return <App { ...this.props } /> came.

Could you explain?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'apply' of undefined · Issue #2359 - GitHub
Hi, Why will I get this TypeError: Cannot read property 'apply' of undefined: when I open my React-Redux-Firebase project in Chrome ...
Read more >
Redux TypeError: Cannot read property 'apply' of undefined
For the undefined cases, it will run (f => f).apply which executes successfully. But this is more of fooling the compose method and...
Read more >
Error message "Cannot read property 'apply' of undefined"
When the UI Action is script is executed, this error is shown in the browser console: Uncaught TypeError: Cannot read property 'apply' of...
Read more >
Cannot read property 'apply' of undefined" - Forums - Liferay
In the console, persistent errors : "Uncaught TypeError: Cannot read property 'apply' of undefined" In what may be the reason?
Read more >
Uncaught TypeError: Cannot read property 'apply' of undefined
Uncaught TypeError: Cannot read property 'apply' of undefined · you are on master · you try with safe-mode if possible · give a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found