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.

Transposition function doesn't work after build in react app

See original GitHub issue

Hello, I use opensheetmusicdisplay for my react application. I have an error when i use transposition function when app is builded “npm run build”. But it works in developement mode “npm run start”

this.osmd.updateGraphic()

  • in chromium browser image

  • in Firefox […] VexFlowMusicSheetDrawer.drawMeasure TypeError: u is undefined

// ...
this.osmd = new OSMD(this.divRef.current, this.osmdOptions)
this.osmd.TransposeCalculator = new TransposeCalculator()
// ...
transpose (value = 0) {
    this.osmd.Sheet.Transpose = parseInt(value)
    this.osmd.updateGraphic()
    this.osmd.render()
}

I don’t know why it doesn’t works after build ?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
paulmattucommented, Aug 28, 2021

Hi, did you tried to import it directly?

import {
  OpenSheetMusicDisplay as OSMD,
  TransposeCalculator,
} from "opensheetmusicdisplay";

works for me.

0reactions
sschmidTUcommented, Nov 23, 2021

@fedwiiix Have you tried it with OSMD 1.3.0? It should work. It works in the plain javascript example project even without the plugin build: https://github.com/opensheetmusicdisplay/RawJavascript-usage-example/blob/master/indexSimpler.html

Closing for now, but can reopen if the problem persists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why won't React production build run on the browser?
But when I build the application and try to access "index.html" file on the build folder, it doesn't work and I encounter with...
Read more >
Underscore.js
Underscore is a JavaScript library that provides a whole mess of useful functional programming helpers without extending any built-in objects.
Read more >
Create a New React App
Create React App doesn't handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any...
Read more >
grid kendo react
It really surprises me how effortlessly Kendo UI Grid works with data that ... a mission to help you design and build business...
Read more >
fastapi upload file to s3
Uploading a file can be done with the UploadFile and File class from the FastAPI ... Key Let's build an image upload service...
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