Skip to content

Importing from package causes error in build only. #164

Description

@Flohhhhh

When running in development, I have no error and it works perfectly.
Running build throws minified error below.
(Even without import for audio file error still occurs)

Error:

Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=object&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Decoded error:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

My code:

import ReactAudioPlayer from 'react-audio-player'
import Music from './assets/audio/music.mp3'

function App() {
  return (
      <div className="app">
         <ReactAudioPlayer id="audio-controls" src={Music} autoPlay loop controls volume={0.05}/>
      </div
   }
}

Also found this error on the tsconfig.json
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions