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

PDF generation failed. Cannot find module 'C:\Users\Username\.atom\packages\fountain\configs\afterwritingFonts.json.js' #110

Open
trochitv opened this issue Nov 28, 2020 · 30 comments

Comments

@trochitv
Copy link

trochitv commented Nov 28, 2020

Hi,

after I resolved my problems of not being able to install fountain by installing git, I now face the issue of not being able to generate pdfs from my .fountain files.

I installed the afterwriting cli via npm, but when I try to render the preview I am faced with this error:

image

and no pdf.

Thank you for your time.

P.S. I am on Windows 10

@trochitv
Copy link
Author

trochitv commented Dec 5, 2020

Anyone?

@superlou
Copy link
Owner

superlou commented Dec 5, 2020

@trochitv I don't think you should've needed to install Afterwriting manually, though I don't think that should've hurt anything. If you aren't using the Afterwriting CLI, can you try uninstalling that, uninstalling the Fountain-Atom package, then reinstalling the Fountain-Atom package?

On Linux Mint, I'm not getting the error you are, but it is saying "An error occurred while loading the PDF," and I don't see a PDF file being created. Do you get that message?

@jrbostic
Copy link
Collaborator

jrbostic commented Dec 5, 2020

It's extremely odd that it would be looking for a file with the extension ".json.js". The json file is legit part of rendering with afterwriting... But what is requesting that file with js extension, I have no idea. It's definitely wrong though.

@trochitv
Copy link
Author

trochitv commented Dec 5, 2020

Thank you so much for the answers!
It didn't show me a pdf when I had not installed afterwriting yet, so I went ahead and did. Pretty sure it was the very same issue, but I will try with it uninstalled later.

It says "pdf file generated" but apparently it never is. I do not get an explicit error concerning the pdf.

Is there anything else I can try or more info I can give you?

@superlou
Copy link
Owner

superlou commented Dec 5, 2020 via email

@trochitv
Copy link
Author

trochitv commented Dec 5, 2020

image

This is what that looks like.

@superlou
Copy link
Owner

superlou commented Dec 5, 2020

If you click one more time in the editing pane, e.g. on EDWARD, does the outline finish populating? Something looks very weird.

@trochitv
Copy link
Author

trochitv commented Dec 5, 2020

Nope. "INT. WILL'S BEDROOM -NIGHT (1973)" is all I ever get. :/

@trochitv
Copy link
Author

trochitv commented Dec 5, 2020

With the entire big fish script it looks like this:
image

@superlou
Copy link
Owner

superlou commented Dec 6, 2020

I might have something. If I update to the latest Afterwriting release, the PDF generation tests start to fail and I receive a similar error:

image

@trochitv, can you go into the Fountain installation and look in package-lock.json for the version of the Afterwriting dependency? @jrbostic Is there any chance Afterwriting has changed the inputs to rendering?

@superlou
Copy link
Owner

superlou commented Dec 6, 2020

@jrbostic
Copy link
Collaborator

jrbostic commented Dec 6, 2020

@superlou It wouldn't surprise me... But the Afterwriting dependency version in package.json shouldn't have that particular change yet, based on what I saw in the merge comments for that change.

@superlou
Copy link
Owner

superlou commented Dec 6, 2020

Agreed. I'm wondering if something happened when @trochitv installed the Afterwriting CLI. That said, I'm not sure why it would affect the Afterwriting version the atom package is using.

@superlou
Copy link
Owner

superlou commented Dec 6, 2020

@jrbostic I pushed an update to trunk that uses the latest Afterwriting, with some hacks to use the new font loading scheme. The test suite passes, but it doesn't really test that functionality. I'm not sure if overwriting existing PDFs is working, though the tests pass. Can you take a look when you get a chance and see if it works for you?

@trochitv
Copy link
Author

trochitv commented Dec 6, 2020

@superlou it says version 1.12.7

@trochitv
Copy link
Author

Just recreated it on my Ubuntu machine. Didn't install afterwriting there.

@superlou
Copy link
Owner

@trochitv Can you try running the development version on the trunk?

@trochitv
Copy link
Author

I'm sorry, where may I find the development version? >.<

@superlou
Copy link
Owner

@trochitv, you should be able to get it by uninstalling the Fountain you have installed, then doing apm install fountain in a terminal.

@johnygum
Copy link

Hello! I have the same issue. I am running Debian 10. I have installed the package through the Atom UI and also with apm install fountain and nothing worked. Thanks for the help!

When I open Developer tools in Atom, I get basically the same error as in this screenshot:

image

@superlou
Copy link
Owner

Sorry, I typo'd in my earlier comment. Please uninstall the package again, then try apm develop fountain.

@johnygum
Copy link

Hi, Thanks, this kind of worked, with apm develop fountain, cloned github repo into /home/user/github/fountain and made a link to /home/user/.atom/dev/packages/fountain, but when I restarted Atom, the package didn't work, I checked in the package list and saw Fountain under development packages, but it said, it wasnt installed, there was only an "install" button. I clicked that button, and then it installed the old version, that didn't work... I then just overriden everything from /home/user/.atom/packages/fountain with /home/user/github/fountain and now it works. I am pretty sure this is not the correct way to install dev version... I am not very familiar with Atom packages... Thanks again

@superlou
Copy link
Owner

@johnygum That's probably not a great way, but I think that successfully got the latest source installed as a plugin. 😄 I think apm install [email protected]:superlou/fountain-atom.git might also have worked, but I'm not sure. Can you summarize what wasn't working and double check that it is now working?

In theory, if everything is working, we can publish this source as a release so it's easier to install. However, it's a pretty hacky change to some of @jrbostic 's code, so I was hoping he would weigh in.

@johnygum
Copy link

Hi, i uninstalled the package and installed it with apm install https://github.com/superlou/fountain-atom.git and now it is working fine.
Before, I installed the package through Atom UI, and it installed fine, and outline view worked, but pdf generation and preview didn't.
I noticed a problem when I try to generate a PDF with Ctrl + Alt + Shift + X when the pdf already exists, it doesn't overwrite it, even though I selected overwrite when Atom opens the message. I see no error in the console window. If I delete the pdf file and generate it again, it works fine. I am not sure if these problems are related.

@superlou
Copy link
Owner

@johnygum I can confirm the same problem with PDFs not being overwritten. The weird thing is we have a test case that is supposed to check for that which is still passing. I don't think anything about the latest Afterwriting should affect overwriting PDFs, but that does seem like the most likely culprit.

@superlou
Copy link
Owner

@johnygum PDF overwriting is tentatively fixed in the latest master. Can you try uninstalling and reinstalling from github?

@jrbostic
Copy link
Collaborator

@superlou Sorry, I only saw part of this thread last weekend. I'm trying to figure out where/how to set this project up on one of my newer machines. Re-establish some kind of workflow. Took me a lot of dedicated time a few years ago... Can't remember any of it now... Lol

@superlou
Copy link
Owner

@jrbostic No worries. Every time I come back to this I have to relearn the toolchain, and it doesn't help that all of the docs have switched back to Javascript.

@johnygum
Copy link

@johnygum PDF overwriting is tentatively fixed in the latest master. Can you try uninstalling and reinstalling from github?

Hi, I installed the new version and now everything is working!

Thanks very much!

@trochitv
Copy link
Author

Working for me as well. Thank you very much :)

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

No branches or pull requests

4 participants