Coder Social home page Coder Social logo

Comments (4)

annrodriguez avatar annrodriguez commented on May 26, 2024

I am also running into this issue.

I just manually changed the module key in the package.json file to browser before packing up my serverless code as a test, and my code all worked as expected.

After changing browser back to the incorrect module see package.json standard and webpack docs...

I added a rule to the module key in my webpack configuration that specifies the correct mainField

{
  test: /node_modules\/@octokit\/webhooks(-methods)?/,
  resolve: {
    mainFields: ['main']
  }
}

I suspect if this bug is ever completed, this may have to change, but for now... this is working for me in case anyone else finds this thread.

from webhooks-methods.js.

wolfy1339 avatar wolfy1339 commented on May 26, 2024

Unfortunately this isn't a problem we can fix ourselves. This would be a problem with the build system, which is not maintained anymore.

This will get fixed once we switch to using pure ESM + seperate types

from webhooks-methods.js.

wolfy1339 avatar wolfy1339 commented on May 26, 2024

We are starting to migrate away from Pika, and towards using esbuild to generate the different bundles, and tsc to generate the types.

We will be able to get this addressed in a new major version

from webhooks-methods.js.

wolfy1339 avatar wolfy1339 commented on May 26, 2024

#159 Should help get this sorted out

In the meantime, you can always load the package from a CDN:

import { sign, verify } from "https://esm.sh/@octokit/[email protected]";

from webhooks-methods.js.

Related Issues (6)

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.