uppy: TypeError: Super expression must either be null or a function, not undefined

I get this error: TypeError: Super expression must either be null or a function, not undefined _inherits node_modules/@uppy/dashboard/lib/ActionBrowseTagline.js:5

I had Uppy working fine and then it broke when some package upgraded (not sure what changed). I was using 0.25.6 when it happened. I tried upgrading to 0.26.0 and it didn’t help. Here is what I’m currently using:

"@uppy/core": "0.26.0",
"@uppy/react": "0.26.0",
"@uppy/xhr-upload": "0.26.0",
"react": "16.4.2",
import Uppy from '@uppy/core';
import { Dashboard } from '@uppy/react/lib/Dashboard';
import XHRUpload from '@uppy/xhr-upload';

export class NoteUploader extends Component {
  constructor(props) {
    super(props);

    const idToken = localStorage.getItem('id_token');

    this.uppy = new Uppy({
      autoProceed: false
    }).use(XHRUpload, {
        endpoint: `${process.env.REACT_APP_API_URL}/upload`,
        fieldName: 'files[]',
        headers: {
          accept: 'application/json'
        }
    });
  }

Any ideas what is wrong?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

Found my mistake: import { Dashboard } from '@uppy/react/lib/Dashboard'; Should be this: import Dashboard from '@uppy/react/lib/Dashboard';

For some reason this didn’t work for me: import { Dashboard } from '@uppy/react'

Any progress on this issue?

It is still not working on React

After doing an npm install the problem is back. But I found a fix. I reverted Preact from 8.3.0 to 8.2.9 in package-lock.json and did an npm ci to install from the package-lock.

Wondering if anybody else has had this problem and how they fixed ‘npm install’.