mjmlio / vscode-mjml

MJML preview, lint, compile for Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=attilabuti.vscode-mjml
MIT License
178 stars 25 forks source link

MJML couldn't build the proper version of PhantomJS #38

Closed rucksman closed 1 year ago

rucksman commented 1 year ago

Pretty new to MJML. Tried to install the extension into my VSCode. Install completed without any problems. Wrote a very simple "Hello World" template in VSCode. Then tried to preview it in VSCode. Result: MJML couldn't build the proper version of PhantomJS. Restart VSCode in order to try it again.

So I restartet VSCode, but the error appeared again.

iRyusa commented 1 year ago

You're not on this version, it only happen's when using Attila's original version

tbunique commented 1 year ago

I uninstalled and reinstalled this specific version of MJML VSCode extension several times just to be sure and I still get this error message. image

Knappster commented 1 year ago

Sadly I'm running into the same issue. Double checked I'm using the right extension. MJML couldn't build the proper version of PhantomJS. Restart VSCode in order to try it again.

sk-gara commented 11 months ago

Same here. Can we reopen this issue?

iRyusa commented 11 months ago

What OS are you running ? Can you do some preview ?

sk-gara commented 11 months ago

Hi! Windows 10 and Debian 12. What do you mean by doing some preview?

iRyusa commented 11 months ago

If you take a MJML file and doing a preview via the command palette does it do anything ?

On Fri, Nov 17, 2023 at 5:01 PM S @.***> wrote:

Hi! Windows 10 and Debian 12. What do you mean by doing some preview?

— Reply to this email directly, view it on GitHub https://github.com/mjmlio/vscode-mjml/issues/38#issuecomment-1816686235, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELHTIDLXKG2WYO2VWOSMDYE6C3ZAVCNFSM6AAAAAAX7KPQBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGY4DMMRTGU . You are receiving this because you modified the open/close state.Message ID: @.***>

sk-gara commented 11 months ago

Ah! :) In the preview pane appears the message "Active editor doesn't show a MJML document.", while vscode notifies: "MJML needs to be rebuilt for your current platform. Please wait for the installation to finish..."

This fails with "MJML couldn't build the proper version of PhantomJS. Restart VSCode in order to try it again."

iRyusa commented 11 months ago

Sorry to ask, but it was done on a MJML file right ?

It's so weird as Phantom is only used for screenshot. We maybe need to remove this for now as phantom is no longer maintained anyway.

On Fri, Nov 17, 2023 at 5:34 PM S @.***> wrote:

Ah! :) In the preview pane appears the message "Active editor doesn't show a MJML document.", while vscode notifies: "MJML needs to be rebuilt for your current platform. Please wait for the installation to finish..."

This fails with "MJML couldn't build the proper version of PhantomJS. Restart VSCode in order to try it again."

— Reply to this email directly, view it on GitHub https://github.com/mjmlio/vscode-mjml/issues/38#issuecomment-1816735066, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAELHTM2WOCIZHNGDR663ULYE6GX3AVCNFSM6AAAAAAX7KPQBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWG4ZTKMBWGY . You are receiving this because you modified the open/close state.Message ID: @.***>

sk-gara commented 11 months ago

No problem :) But yeah, I'm testing on the demo mjml taken from the online editor.

sk-gara commented 11 months ago

Hey! I just had a moment to think about this issue and found something. It works when the source is an actual file. I only opened a new tab and set the language to mjml before. I wasn't aware that this is how you're supposed to use it. Maybe it should say so explicitly in the description? I imagine this restriction comes with the way the processor works?

iRyusa commented 11 months ago

I think we can do it for unsaved file but I guess it would mean to do some stuff to handle relative path (img, and so on...)

sk-gara commented 11 months ago

I'm okay with working with files for now. I just think there should be a line somewhere in the README.md to make it clear. A fileless preview and live editing would be nice of course. Maybe set a working directory in the settings where relative paths can be set for assets.