Skip to content

exe/asar archive created with jwt-decode(3.1.2) does not work #1503

Open
@ssrakesh

Description

@ssrakesh

Preflight Checklist

  • [x ] I have read the contribution documentation for this project.
  • [x ] I agree to follow the code of conduct that this project follows, as appropriate.
  • [ x] I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    17.1.1
  • Electron Version:
    v20.0.1
  • Operating System:
    Windows 11 x64
  • Last Known Working Electron Packager version::
    NA

Expected Behavior

Actual Behavior

To Reproduce

-build a simple electron(v20.0.1) application.
-in main.js include
const jwtDecode = require('jwt-decode');
-open the project/folder in vs code. press F5 to debug
-no issues

-include electron-packager(17.1.1) library
-build the project using this to make x64 exe
-run the exe
error reported
[2023-04-19 23:27:15.933] [error] App: Crash in Main: Error: Cannot find module 'app.asar\node_modules\jwt-decode\build\jwt-decode.cjs.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:360:19)
at Module._findPath (node:internal/modules/cjs/loader:573:18)
at Module._resolveFilename (node:internal/modules/cjs/loader:926:27)
at n._resolveFilename (node:electron/js2c/browser_init:245:1105)
at Module._load (node:internal/modules/cjs/loader:785:27)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (drive:\folder\main.js:12:32)
at Module._compile (node:internal/modules/cjs/loader:1120:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions