manuelernestog / weektodo

WeekToDo is a Free and Open Source Minimalist Weekly Planner and To Do list App focused on privacy. Available for Windows, Mac, Linux or online.
https://weektodo.me
GNU General Public License v3.0
1.52k stars 169 forks source link

Can the project be compiled correctly now? #221

Open kero990 opened 11 months ago

kero990 commented 11 months ago

I tried to compile using npm run build and npm run release, but an error occurred and I couldn't find 'background. js'

⨯ Application entry file "background. js" in the "/root/weektodo/list/Linux arm64 unpacked/resources/app. sar" does not exist Seems like a wrong configuration Failed Task=build

I tried changing background. js in package. json to src/background.js, this time the packaging was successful, but the runtime still reported an error.

A JavaScript error occurred in the main process
Uncaught Exception:
~/weektodo/dist/linux-arm64-unpacked/resources/app.asar/src/background.js:3
import { app, protocol, BrowserWindow, Menu, Tray, ipcMain, nativeImage } from "electron";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1183:20)
    at Module._compile (node:internal/modules/cjs/loader:1225:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1324:10)
    at Module.load (node:internal/modules/cjs/loader:1124:32)
    at Module._load (node:internal/modules/cjs/loader:965:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at node:electron/js2c/browser_init:2:122731
    at node:electron/js2c/browser_init:2:122934
    at node:electron/js2c/browser_init:2:122938
JH34tem commented 6 months ago

Same issue