Skip to content

Conversation

samarpit-santoki
Copy link

When using react-dropzone-uploader in a next 14 project the production build fails with the following error message

./node_modules/react-dropzone-uploader/dist/Dropzone.tsx:504:44
Type error: 'e' is of type 'unknown'.

  502 |       params = await getUploadParams(fileWithMeta)
  503 |     } catch (e) {
> 504 |       console.error('Error Upload Params', e.stack)
      |                                            ^
  505 |     }
  506 |     if (params === null) return
  507 |     const { url, method = 'POST', body, fields = {}, headers = {}, meta: extraMeta = {} } = params
error Command failed with exit code 1.
  • giving type to the e solves the error

When using react-dropzone-uploader in a next 14 project the production build fails with the following error message

```ts
./node_modules/react-dropzone-uploader/dist/Dropzone.tsx:504:44
Type error: 'e' is of type 'unknown'.

  502 |       params = await getUploadParams(fileWithMeta)
  503 |     } catch (e) {
> 504 |       console.error('Error Upload Params', e.stack)
      |                                            ^
  505 |     }
  506 |     if (params === null) return
  507 |     const { url, method = 'POST', body, fields = {}, headers = {}, meta: extraMeta = {} } = params
error Command failed with exit code 1.
```

- giving type to the e solves the error
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.

1 participant