Parcel unable to bundle webnative
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:
- Clone https://github.com/fission-suite/webnative-bundler-test
- Upgrade webnative and parcel to the latest versions
- 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):
- OS: macOS
- Webnative at
0.31.1 - Parcel at
2.2.1
Additional context
Parcel was working at 2.0.0. It's possible that Parcel changed some expectation in the newest versions.
still an issue with 0.32.0 and skypack seems to have problems with that auth module as well:
