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

No editing menu displayed on Mac Mojave #19

Open
freevie opened this issue Mar 9, 2019 · 9 comments
Open

No editing menu displayed on Mac Mojave #19

freevie opened this issue Mar 9, 2019 · 9 comments

Comments

@freevie
Copy link

freevie commented Mar 9, 2019

After I run npm start, a blank screen appears.
image

I've read from somewhere that this is intended. So, I open the official demo. The demo appears, but I can't see any editing menus at the top.
image

Can anyone please help? How can I make the editing menu to be displayed?
I am using macOS Mojave (Version 10.14)

@henrikingo
Copy link
Owner

I don't have Mac myself, so can't test this, but:

  • The first image is correct. There's no start page yet, so the File menu and a blank page is all you get.
  • The second is definitively a bug. There should be a toolbar overlayed into the presentation itself.

The only obvious question is that you need a recent (like last 12-18 months) version of the official demo. (More precisely, 1.0 version or newer of the impress.js file.) These are known to work: https://github.com/henrikingo/impressionist-templates/tree/master/official-demo

Just in case you never saw it work, this is what it should look like: https://youtu.be/c07w0hsC4yQ?t=243

@freevie
Copy link
Author

freevie commented Mar 25, 2019

@henrikingo ,
Thanks for the reply. I ran Electron with the dev mode, and get the following errors when I open a template file.

image

I did try moving the missing files from other folders in to the specified locations, but this results in another error.

@henrikingo
Copy link
Owner

Ok thanks for this info. I'll look into this.

@henrikingo
Copy link
Owner

henrikingo commented May 20, 2019

I had the chance to look into this a couple weeks ago. It turns out on Linux this actually works correctly. But based on the information you provided, I know that this is the suspect line:

var impressionistRoot = __dirname;

It seems electron does different things for __dirname on different operating systems. The version of electron is quite old. I will try to upgrade impressionist to use the latest version and see if it helps anything.

Thanks for your patience!

UPDATE: This comment is wrong. The errors above are not from __dirname rather those paths use process.resourcesPath as the root of the path.

@razvan-mocanu
Copy link

Here is how it worked for me on MacOS Mojave.

Caution, I didn't test if that will break functionality on other platforms!

  1. In main.js:12 add
    webPreferences: { nodeIntegration: true }
    so it becomes:
    mainWindow = new BrowserWindow({ useContentSize: true, icon: './favicon.png', webPreferences: { nodeIntegration: true } })
    That will make the 'process' available (https://electronjs.org/docs/api/process).

  2. Then in /src/plugins/loadcss/loadcss.js:10 add "/../.." to the path. So, two levels back.

  3. Same in /src/plugins/tinymce/tinymce.js:78

  4. Optionally you can update electronjs by running in your project root 'npm i -D electron@latest'

@paropp
Copy link

paropp commented May 29, 2019

same problem on ubuntu 18.04.02:
tried last edits. running, but no changes. no editing menu.
electron v5.0.2
node v8.10.0
npm 3.5.2

@rharper2
Copy link

rharper2 commented Jul 3, 2019

Running a beta of MacOS Catalina:

I found I also had to change the path (same, two levels back) in line 1568 and line 1112 of impressionist.js

Oh to save people not familiar with the dev tools looking up how to enable them you add

mainWindow.webContents.openDevTools()

just after the new BrowserWindow on line 12/13 of main.js

Then once you have loaded they slides, you can examine the console to see if it couldn't find the correct resources.

@henrikingo
Copy link
Owner

henrikingo commented Jul 6, 2019

Hi

Sorry to keep everyone waiting. While I'm quite excited about the possibilities for Impressionist, I have been prioritizing incoming PRs in impress.js side. After all, that's a widely used and stable project while this is still experimental.

But now it is Summer and I finally do have some time for Impressionist. As a first step I committed upgrade to electron. However, after looking around a bit, it seems to me this is not an electron version issue and if you retry npm start now you will still have the same experience. It seems to me that process.resourcesPath varies on different platforms (and maybe different node versions). I'll work on a solution to just rely on __dirname of main.js file.

That said, feel free to retry and let me know how it goes.

@henrikingo henrikingo reopened this Jul 6, 2019
@henrikingo
Copy link
Owner

Ok. Above commit avoids using process.resourcesPath. Let me know if it helps.

Please also test typing on a slide. I worry that tinymce installation path may not always be the same for everyone.

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

5 participants