Miramac / node-office-script

Scripting MS Office application with node.js
ISC License
49 stars 5 forks source link

Electron Forge failes to start #24

Open hoodji opened 3 years ago

hoodji commented 3 years ago

Hi when I install the package using npm install my application fails to start using npm start

This is before I add any of the example code to my project

I am using Windows 10, Office 365, and Electron (latest versions of all)

The command returns an error log and Error Status 1 .. if you have any insights they would be much appreciated

Miramac commented 3 years ago

This module requires edge-js, for electron applications it must use this module https://github.com/agracio/electron-edge-js

If you want to test it quick & dirty: Install electron-edge-js: npm install electron-edge-js And change the file node_modules\office-script\lib\powerpoint\edge\application.js from: var edge = require('edge-js') to: var edge = require('electron-edge-js')

hoodji commented 3 years ago

Hi, Thanks for pointing this out .. and I finally got round to testing this and am having the same issue with electron-edge-js, and looking at the errors generated, it looks like I have to have visual studio with c++ installed ... I can do this, but worried that this will carry over into the published app, either bloating it with VS, or not running because the user does not have VS .. the pertinent bit of the error log is : ERR! find VS ** gyp ERR! find VS You need to install the latest version of Visual Studio gyp ERR! find VS including the "Desktop development with C++" workload. gyp ERR! find VS For more information consult the documentation at: gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows gyp ERR! find VS ** gyp ERR! find VS gyp ERR! configure error

hoodji commented 3 years ago

Hi,

I have followed the instructions at https://github.com/nodejs/node-gyp#on-windows and installed the windows utilities etc .. still getting the sanme error tho

Miramac commented 3 years ago

I am sorry that I cannot help you with this error... And I know that node-gyp errors in Windows can be very frustrating. I was able to get it to work with electron, so I think the error must occur somewhere else.