Skip to content
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

Bug report #343

Open
Nick-Mazuk opened this issue Aug 20, 2022 · 5 comments
Open

Bug report #343

Nick-Mazuk opened this issue Aug 20, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@Nick-Mazuk
Copy link
Member

Description

hello, trying to work with smufl_load_engraving_defaults plugin
I get this answer: "...module 'lunajson.decoder' not found"
any help? thanks

Metadata

  • Finale v27
  • macOS 12
  • Script: smufl_load_engraving_defaults.lua

Created through the website by Alessandro Melchiorre [email protected]

@Nick-Mazuk Nick-Mazuk added the bug Something isn't working label Aug 20, 2022
@rpatters1
Copy link
Collaborator

They can fix it now by downloading the luajson directory to be in the directory where their script is. Longer term, that could be added to the distribution packager.

@Nick-Mazuk
Copy link
Member Author

It should now be bundled. As of the bundler rewrite, it accepts any arbitrary static imports as long as it's in the src folder.

@rpatters1
Copy link
Collaborator

rpatters1 commented Aug 20, 2022

I'm looking at dist/smufl_load_engraving_defaults.lua and it included luajson.luajson but not luajson.decoder and luajson.encoder. (These are required by luajson/luajson.lua.

@Nick-Mazuk
Copy link
Member Author

I see. It's likely because these require statements don't use parenthesis.

local newdecoder = require 'lunajson.decoder'
local newencoder = require 'lunajson.encoder'
local sax = require 'lunajson.sax'

This is how an import is currently defined in the parser:

const matches = line.match(/require\(["']([A-Z_a-z.]+)["']\)/iu)

@Nick-Mazuk
Copy link
Member Author

#345 (nice PR number) should fix this problem, but let's leave this issue open as the long-term fix is to update the bundler to support this edge case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants