passport-sdk icon indicating copy to clipboard operation
passport-sdk copied to clipboard

Issue loading passport-sdk-writer

Open lucianHymer opened this issue 1 year ago • 0 comments

I'm able to work with Reader, Verifier, and Scorer just fine.

But, I cannot load the Writer module.

At first I got an error about mjs files, but I modified webpack to tell it how to load these (craco used in this example)

...
webpackConfig.module.rules.push({
        test: /\.mjs$/,
        include: /node_modules/,
        type: "javascript/auto",
      })
...

I think I did the right thing there.

But now I get the following error:/ image

I've been stuck here. I notice that the package.json for passport-sdk-writer has "dist/esm/src/index.js" as main, but I don't have that esm directory. I think that's the crux of the issue.

I wonder if this is all related, since it all seems to do with modules? If I hack that package.json and remove "esm" from the path, it actually seems to be working (or at least building and running, I haven't successfully written yet), but that seems very wrong haha.

Is it possible that something got left out of the NPM publish? Or do the devs for this have something set up in their environment that makes this work? Or am I just missing something?

Thank you!

lucianHymer avatar Sep 08 '22 16:09 lucianHymer