Closed lcherone closed 4 years ago
My bad,
I looked through the code and can see that the message which says MJML needs to be rebuilt for your current platform. Please wait for the installation to finish... is actually just installing phantom-js and once its done the following shows JML's been updated. Please restart VSCode in order to continue using MJML. - I/one would presume from them messages that its an update and is unrelated to screenshots when it all works (except screens) afterwards.
I restarted vs-code and it works fine after some initial boot time the screen size prompt pops up.
My suggestion would be to simply tell the user your installing phantom-js vs saying doing an update, then specifically tell them to restart to enable screenshot functionality, though as long as one actually reads the message and restarts It should be fine.
Though you could also probably make a method for the code in the constructor
subscriptions.push(
commands.registerCommand('mjml.screenshot', () => {
this.renderMJML(false)
}),
commands.registerCommand('mjml.multipleScreenshots', () => {
this.renderMJML(true)
}),
)
// passing subscriptions object to the rebuild method call
... and then call it on the successful install of phantom-js line 63, then it won't need the restart message, it would just work.
Did you know phantom-js is deprecated?
It's a fork of first "community" extension here so we've never really looked that part of the extension. PhantomJS is just archived not really deprecated, i'm not sure we really want to re-do that part just for this ?
np, sorry I just saw on npm that it says its deprecated https://www.npmjs.com/package/phantomjs-prebuilt
When attempting to take a screenshot of the file via Command Pallet (Ctrl-Shift-P), the above error pops up. No biggie as can take manual screen but looks like a bug.
Specifications
1.0.1
Linux x64 4.15.0-123-generic
Installed via extensions UI bog-standard way, little popup said it was updating mjml and completed without issue, everything else seems to work.