frankhale / electron-with-express

A simple app that demonstrates spawning an Express app from Electron
MIT License
646 stars 147 forks source link

Cannot find node.dll #3

Closed Vishal1419 closed 7 years ago

Vishal1419 commented 7 years ago

I have installed node, After that I have followed the instructions to run this app.

In step 3 it is mentioned that a copy of node.exe and node.dll should be copied in the root directory of project. So, I searched for Node.exe and Node.dll in the folder where I installed node.

I found Node.exe but I am unable to find node.dll.

The problem here is when I run the app, I can see a window. But it has a round progressbar. I don't get any content in short.

frankhale commented 7 years ago

I'll try to make it more clear in the README where and why you need these. Get the node.exe and node.lib from here:

64bit - https://nodejs.org/dist/v6.3.1/win-x64/ 32bit - https://nodejs.org/dist/v6.3.1/win-x86/

Vishal1419 commented 7 years ago

Thank you. The issue is solved. But after that I got another issue. I can't see the text below welcome. The size of my window is 800 x 600 or full-screen, in either case the size of object#browser-plugin-1 is 300 x 150. Also, the heading "Express" is cut-down. Why is it so?

electron-with-express

frankhale commented 7 years ago

I'm not sure I understand what issue you are experiencing now

jimwild commented 7 years ago

I'm having the same issues, any pointer to get this running on OSX? The express-app runs fine stand alone but not when I start Electron. Just getting the spinning loader also.

events.js:160 Uncaught Error: spawn node.exe ENOENT

Thanks in advance

frankhale commented 7 years ago

I don't have a Mac so I cannot test this

jimwild commented 7 years ago

No worries. Obviously node.exe being called on a mac won't work. I'll see if I can find a workaround and let you know. Cheers

jimwild commented 7 years ago

That was easier than I thought - for OSX/Linux just change node.exe to node in index.html line 49

node = spawn("node", ["./express-app/bin/www"], { cwd: process.cwd() }),

frankhale commented 7 years ago

@jimwild you rock!

Vishal1419 commented 7 years ago

@frankhale I am running windows. Can you please provide a working sample without clipping of body as shown in above image?

frankhale commented 7 years ago

@Vishal1419 looks like the CSS to make the webview the size of the window isn't working in your case. I'll test today to see if I can reproduce this in the latest version of Electron.

frankhale commented 7 years ago

@Vishal1419 I just tested on Windows 10 and I cannot reproduce the behavior that you are seeing with respect to the size of the webview.

The following CSS should be kicking in for you:

.fullSize {
        position: absolute;
        width: 100%;
        height: 100%;
        display: none;
        overflow: auto;
 }

The webview should be using the class which makes it the full size of the window:

<webview id="expressApp" class="fullSize"></webview>
frankhale commented 7 years ago

@Vishal1419 actually I can reproduce this. It looks like the webview does have the correct size, eg. it's being set to 100% width and height but the object that is inside the webview which contains the content isn't sized the same so the content is clipped like you see. I'll see what I can do to force the object inside the webview to be the full size of the window.

frankhale commented 7 years ago

Needed to use flex layout. I guess this is a new thing added in recent versions of Electron.

http://electron.atom.io/docs/api/web-view-tag/#css-styling-notes

This is fixed in commit 861d81d13012bdf5bc806723071a344f075df86c

frankhale commented 7 years ago

The resizing of the webview should be fixed in commit 861d81d. I just checked and when resizing the webview and it's contents are correctly resized based on the size of the window.

frankhale commented 7 years ago

Here is an animated gif showing resizing content is working as expected.

2016-08-10_10-25-14

Vishal1419 commented 7 years ago

@frankhale Thank you very much