Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid or incompatible cached data (cachedDataRejected) with Vue and Electron

See original GitHub issue


I am using Vuejs and Electron using this plugin:

I’m trying to protect the electron code using bytenode but I’m running onto the Invalid or incompatible cached data error when running the packaged application.

I have created a basic repository to replicate the error

If I run the builder to only generate the package directory I can run electron . from the bundled directory and it runs using the .jsc file just fine, but when I package it for distribution it errors.

I have gone through the issues from people that have ran into the same error, but I’ve had not luck fixing it.

Any help is appreciated,


Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

maplebycommented, Jul 2, 2020

const { app, BrowserWindow } = require(‘electron’) function createWindow () { // 创建浏览器窗口 let win = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true } })

// 加载index.html文件 win.webContents.openDevTools() win.loadFile(‘index.html’) } app.whenReady().then(createWindow)

const bytenode = require(“bytenode”); // 编译二进制文件 let compiledFilename = bytenode.compileFile({ filename: ‘./test.js’, output: ‘./test.jsc’ // if omitted, it defaults to ‘/path/to/your/file.jsc’ }); require(“./test.jsc”)

window.onload = () => { const div = document.querySelector(“div”);

div.innerText = “哈哈” }

maplebycommented, Jul 2, 2020

Compile with nodejs. The version of nodejs V8 engine is different from that of electron V8 engine. That’s what happened.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid or incompatible cached data (cachedDataRejected ...
Hi,. I am using Vuejs and Electron using this plugin:
Read more >
qjh/vue-electron-bytenode - Gitee
How to replicate the Invalid or incompatible cached data (cachedDataRejected) error. run yarn build:dir rename dist_electron/bundled/background.js to ...
Read more >
How to Compile Node.js Code Using Bytenode? - HackerNoon
In this post, I will show you how to “truly” compile Node.js (JavaScript) code to V8 Bytecode. This allows you to hide or...
Read more >
Building an app with Electron and Vue - LogRocket Blog
If you've worked with Vue before, it's simple to get started with Electron. Use the Vue CLI plugin for Electron Builder and make...
Read more >
Node.js v19.3.0 Documentation
Script cached data; DEP0111: process.binding(); DEP0112: dgram private APIs ... _unrefActive(); DEP0128: modules with an invalid main entry and an index.js ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found