New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm-upgrade (webpack 5) #1105
npm-upgrade (webpack 5) #1105
Conversation
Cross-blob 3 can't be used with |
Simon how should I run the visual regression test? |
As I said, you can't run it on this PR currently, because it needs |
Here's how you normally do it: |
Migrated!
|
Awesome, thank you very much! I'll take a look soon. |
@rvilarl The Create PDF function (button) in the demo is broken. (you changed the import) Uncaught TypeError: _node_modules_svg2pdf_js_dist_svg2pdf_umd_min__WEBPACK_IMPORTED_MODULE_3__ is not a function
at createPdf (demo.js:899)
at HTMLDivElement.printPdfBtn.onclick (demo.js:412) line in the built demo ( |
Using |
@rvilarl I fixed the pdf function, we can even remove one deprecated import now. |
@sschmidTU how do I apply the patch ? |
@rvilarl git apply patchfile |
@sschmidTU Done |
@rvilarl [karma-server]: Error during file loading or preprocessing
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined
at new NodeError (node:internal/errors:371:5)
at Hash.update (node:internal/crypto/hash:105:11)
at Object.sha1 (/Users/simon/OSMD/opensheetmusicdisplay-working-copy/node_modules/karma/lib/utils/crypto-utils.js:9:8)
at runProcessors (/Users/simon/OSMD/opensheetmusicdisplay-working-copy/node_modules/karma/lib/preprocessor.js:70:26) I upgraded to node 16, didn't fix it. |
@sschmidTU yes it works:
|
@sschmidTU I suggest that you delete the |
@rvilarl I did that twice now, it still doesn't work. Strange. |
@sschmidTU how can we compare our environments?
|
I don't have ng, where is that from? ng --version
bash: ng: command not found I'm using: I doubt that Node 14 will make it work. |
Still same error with your node and npm versions installed. |
Okay, I made it run with some hacks, seems to be a problem with karma-webpack 5 and MacOS. In And in I guess I'll have to open some issues at karma-webpack... edit: both karma files seem fixed on their master. They just need to make a new release. Related issues: |
The karma-webpack issue is fixed on their master, just not released yet. In the worst case, we could add a |
Very good! I am happy that you found it! So perhaps we wait for the fix to come and then merge this one. |
The changes in this PR look good now except for the karma-webpack issue, I'll merge it once that is fixed. (If they don't release a new version in a few days, I'll create the |
@sschmidTU I just rebased the latest from development. It does not seem that karma-webpack is planning to release in short term. Should we go for the patch? |
It's not about visual tests (they don't run on Windows), but about npm test. Maybe this is the problem: Maybe you don't have different partitions on your hard drive. |
I will give it a try... yes I get the same error. Is windows a problem? if visual regression tests do not run there, it is not really an adequated developing platform, is it? |
Yes, it's a problem. Visual Regression tests run on Windows using WSL. |
In C:/ it runs well. I believe that this is a reasonalbe limitation that we could state in the README for a while until it is fixed. Don´t you agree? |
No. Partitions and drive letters aren't exactly a new concept. |
OK let us try to progress on another front :) Can you help me with the VexFlowPatch issues that I have opened in VewFlow ? |
Yes, when I have the time. |
Commented on all the issues. |
…6, etc. (opensheetmusicdisplay#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: opensheetmusicdisplay#1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
…6, etc. (opensheetmusicdisplay#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: opensheetmusicdisplay#1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
…6, etc. (opensheetmusicdisplay#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: opensheetmusicdisplay#1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
@rvilarl I've decided to merge this to develop soon. I'll try to patch in correct paths for Windows in karma-webpack, but if it's too much work, I'll just accept the limitation that on Windows, npm test has to be done on the |
File paths on Windows fixed in 5fd2b5a and 75777bd. So, now this can be finally merged to develop from feat/webpack5. @rvilarl For rebasing your PRs etc. you should probably wait until this and the next OSMD Release which is coming soon. |
@sschmidTU what is coming in the next release? I will make a prerelease branch in Vexflow soon and I am also looking on how to fix the Beam issues. |
@rvilarl Just the commits on develop since the last release, roughly this: 1.4.0 (2022-01-07 Preview)Bug Fixes
Features
|
Turns out the npm test error in Windows comes from webpack, not directly from karma-webpack, So we'll have to give up windows multiple drive support for now and just merge #1119, This is merged now by #1119. |
…t Windows npm test still fails on Windows when the project is installed on a secondary drive (e.g. `D:\`), but we'll have to accept this limitation for now if we want to update to webpack 5. * chore: upgrade many npm packages: webpack and karma to 5.x, node to 16, etc. (#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: #1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a) * karma-webpack 5: fix file paths for MacOS, but not Windows unfortunately (#1105) * karma-webpack patch: fix windows paths if not on C:\ partition * karma-webpack patch: fix matches undefined * Revert "karma-webpack patch: fix matches undefined" This reverts commit 75777bd. * Revert "karma-webpack patch: fix windows paths if not on C:\ partition" This reverts commit 5fd2b5a. turns out the problem is in webpack (bundling), not in karma-webpack. and it looks like it's not simple to fix: webpack/webpack#12759 So we'll have to give up windows multiple drive support for now, this is the easiest option, as it works on MacOS (with patch) and Linux now. Co-authored-by: Rodrigo Vilar <rvilarl@gmail.com> Co-authored-by: sschmidTU <s.schmid@phonicscore.com>
Webpack server hot reload for changes in |
@sschmidTU where should I find my |
@rvilarl i don't know, you added it with a npm start:local command in this PR. we can take it out again if it's not necessary. |
@sschmidTU I do not think that I introduced that. It was already there in version 0.9.0 |
…6, etc. (opensheetmusicdisplay#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: opensheetmusicdisplay#1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
…6, etc. (opensheetmusicdisplay#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: opensheetmusicdisplay#1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
…6, etc. (#1105) this needs an upcoming fix to karma-webpack 5.0 in a further commit, see here: #1105 (comment) * npm-upgrade * timeout increased * process.env is not defined * generateImages_browserles migrated to mjs * review comments * npm-upgrade (cherry picked from commit 801b44a)
Npm packages updated