fountain-atom icon indicating copy to clipboard operation
fountain-atom copied to clipboard

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

Open trochitv opened this issue 5 years ago • 30 comments

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 avatar Nov 28 '20 16:11 trochitv

Anyone?

trochitv avatar Dec 05 '20 13:12 trochitv

@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?

superlou avatar Dec 05 '20 15:12 superlou

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.

jrbostic avatar Dec 05 '20 15:12 jrbostic

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?

trochitv avatar Dec 05 '20 18:12 trochitv

For sanity, can you check if Fountain outline view is working? That will at least confirm if the package thinks it's mostly installed.

On Sat, Dec 5, 2020 at 1:58 PM trochitv [email protected] wrote:

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?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/superlou/fountain-atom/issues/110#issuecomment-739334876, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFNIP72QPSBOCENJI47VLDSTJ7EXANCNFSM4UF4Z2KA .

superlou avatar Dec 05 '20 19:12 superlou

image

This is what that looks like.

trochitv avatar Dec 05 '20 20:12 trochitv

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

superlou avatar Dec 05 '20 20:12 superlou

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

trochitv avatar Dec 05 '20 20:12 trochitv

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

trochitv avatar Dec 05 '20 20:12 trochitv

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 avatar Dec 06 '20 15:12 superlou

Pretty sure that's the problem: https://github.com/ifrost/afterwriting-labs/blob/master/docs/clients.md#custom-fonts.

superlou avatar Dec 06 '20 15:12 superlou

@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.

jrbostic avatar Dec 06 '20 15:12 jrbostic

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 avatar Dec 06 '20 15:12 superlou

@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?

superlou avatar Dec 06 '20 16:12 superlou

@superlou it says version 1.12.7

trochitv avatar Dec 06 '20 19:12 trochitv

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

trochitv avatar Dec 13 '20 13:12 trochitv

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

superlou avatar Dec 13 '20 14:12 superlou

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

trochitv avatar Dec 13 '20 23:12 trochitv

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

superlou avatar Dec 14 '20 02:12 superlou

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

johnygum avatar Dec 17 '20 15:12 johnygum

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

superlou avatar Dec 17 '20 15:12 superlou

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

johnygum avatar Dec 18 '20 09:12 johnygum

@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.

superlou avatar Dec 18 '20 12:12 superlou

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.

johnygum avatar Dec 18 '20 13:12 johnygum

@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 avatar Dec 19 '20 13:12 superlou

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

superlou avatar Dec 19 '20 18:12 superlou

@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

jrbostic avatar Dec 19 '20 18:12 jrbostic

@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.

superlou avatar Dec 19 '20 18:12 superlou

@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!

johnygum avatar Dec 22 '20 12:12 johnygum

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

trochitv avatar Dec 22 '20 15:12 trochitv