GithubHelp home page GithubHelp logo

ukoloff / electron-win-ca Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 7 KB

Test win-ca in Electron

HTML 24.98% JavaScript 68.56% CSS 6.46%
electron windows ssl-certificates ssl root-certificate root-certificates

electron-win-ca's People

Contributors

ukoloff avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

electron-win-ca's Issues

How to correctly call win-ca with app.asar?

I have added require('win-ca') at the top of the main.js file. It works fine when I am running the application from VS Code and when the modules are left unpacked. As part of the build process I am packaging electron using asar, i.e. with "build":{"asar": true}" in package.json. When I run it this way I am getting the following error.

Stack: Error: spawn path\to\electron\resources\app.asar\node_modules\win-ca\lib\roots ENOENT
at exports._errnoException (util.js:1024:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
at onErrorNT (internal/child_process.js:374:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:167:16)
at bootstrap_node.js:589:3

I believe this is due to permission issues since the file exists. I've also tried
require('win-ca/fallback') with the same result.
I also noticed app.asar.unpacked directory is also created with win-ca inside. When I try to explicitly use this, i.e. require('path\to\electron\resources\app.asar.unpacked\node_modules\win-ca'), I get the following error.

Stack: Error: Cannot find module 'split'

My question is am I importing the package correctly given the way my app is set up? Have you run into this issue and know of a way to correctly implement?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.