Skip to content

bug with babel-preset-env only in a production built electron app #4

@michaeljelly

Description

@michaeljelly

I found this PR #1 caused serious issues in running osa2 in a built electron app using hardened runtime. When running in dev-mode no issues caused, so a gnarly bug to find.

Specifically, it caused the bug:
Error: Couldn't find preset "env" relative to directory "/"

And this happened every time I called osa2. To fix it, I reverted back to 0.2.2 and did a clean reinstall. I suspect this is a problem with the interaction with the old babel-core and babel-preset env. The newest versions are @babel/core and @babel/preset-env if anyone wants this functionality - I personally don't need it or the overhead!

Given how straightforward the use-case is for this library, it might be a very simple clean upgrade to the new babel and someone could find it worthwhile to drop it in.

But I know nothing about babel and am deep in a pre-launch marathon so won't be doing this until/unless I ever need it later!

To replicate: execute osa2 in an Electron app built with electron-builder and notarised with electron-builder-notarize, using hardened-runtime. (don't know if all these steps are needed, but that was my situation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions