oddsdk / ts-odd

An SDK for building apps with decentralized identity and storage.
https://odd.dev/
Apache License 2.0
179 stars 24 forks source link

Parcel unable to bundle webnative #352

Open bgins opened 2 years ago

bgins commented 2 years ago

Summary

Problem

Parcel is not able to build projects that use webnative.

Impact

Developers may not be able to build their projects if they use Parcel. There may a way to configure Parcel to successfully build.

Solution

Not clear, but it seems that Parcel expects a src directory. We may be able to provide some resolution information to instruct Parcel to use lib instead.

Detail

Describe the bug

When running parcel build in a project that imports webnative, the build fails with an error like:

🚨 Build failed.
[Error: ENOENT: no such file or directory, open '/Users/brian/code/fission/webnative-bundler-test/node_modules/webnative/src/auth.ts'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/brian/code/fission/webnative-bundler-test/node_modules/webnative/src/auth.ts'
}

To Reproduce Steps to reproduce the behavior:

  1. Clone https://github.com/fission-suite/webnative-bundler-test
  2. Upgrade webnative and parcel to the latest versions
  3. Run npm run parcel

Expected behavior

Parcel is able to build a project that uses webnative without an error.

Desktop (please complete the following information):

Additional context

Parcel was working at 2.0.0. It's possible that Parcel changed some expectation in the newest versions.

gotjoshua commented 2 years ago

still an issue with 0.32.0 and skypack seems to have problems with that auth module as well:

cannotFindAuth