get-windows icon indicating copy to clipboard operation
get-windows copied to clipboard

.tmp.node is not a valid Win32 application.

Open eyesmarty opened this issue 3 years ago • 3 comments

Describe the bug i have created project in electron using vue i am using active-win to get info about currently opened app. active-win works fine for both mac and linux but gives error on windows

To Reproduce

  • vue create currently-active-window-info

  • cd currently-active-window-info

  • vue add electron-builder

  • npm i active-win

  • write following code in app.vue

  • const activeWindow = require('active-win'); -created(){(async () => { console.log('currently active window',await activeWindow(options)); })();

  • }

  • npm run electron:build -- --win --mac --linux

Expected behavior after following steps mentioned in reproduce section as soon as app is openend it should display currently focused app detail in console which works fine for mac and linux

Screenshots

in mac without error

Screen Shot 2021-05-22 at 1 27 24 PM

in window with error

Capture

Environment (please complete the following information):

"active-win": "^7.2.0",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-router": "^4.5.12",
"@vue/cli-plugin-vuex": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"electron": "^9.0.0",
"electron-builder": "^22.10.5",
"electron-devtools-installer": "^3.1.0",
"electron-icon-builder": "^1.0.2",
"electron-rebuild": "^2.3.5",
"sass": "^1.32.8",
"sass-loader": "^8.0.2",
"vue-cli-plugin-electron-builder": "^2.0.0-rc.6",
"vue-cli-plugin-vuetify": "^2.3.1",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.7.2"

process versions

node: '12.14.1', v8: '8.3.110.13-electron.0', uv: '1.33.1', zlib: '1.2.11', brotli: '1.0.7', ares: '1.15.0', modules: '80', nghttp2: '1.40.0', napi: '5', llhttp: '2.0.1', http_parser: '2.8.0', openssl: '1.1.0', icu: '65.1', unicode: '12.1', electron: '9.4.4', chrome: '83.0.4103.122'

Vue.config.js module.exports = { "pluginOptions": { "electronBuilder": { "externals": ['iohook','sqlite-async','sqlite3','active-win'], "nodeIntegration": true, "builderOptions": { "publish": [ "github" ] } } }, "transpileDependencies": [ "vuetify" ] }

eyesmarty avatar May 22 '21 08:05 eyesmarty

Facing the same issue. After installing .exe generated by - "electron-builder --win --x64" it is giving me ".tmp.node is not a valid Win32 application".

Prat1143 avatar Jun 10 '21 06:06 Prat1143

I ran into the same issue. I noticed that the error occurs when building the WIndows app on a MacOS or Windows machine. As @Prat1143 mentioned above, setting the --x64 flag doesn't solve the issue when building on a MacOS machine (for me). However, it does not occur when building the Windows app on a Windows machine with the --x64 flag.

Not sure why this would be the case.

wrgoto avatar Jul 23 '21 17:07 wrgoto

Same issue ".tmp.node is not a valid Win32 application".

basantsd avatar Mar 04 '22 11:03 basantsd