Package not working with next.js turbo mode `Cannot access 'BeaconError' before initialization`
Describe the bug (current behavior)
Following up https://github.com/airgap-it/beacon-sdk/issues/783 update, I tried to upgrade the package in my project but (same as with the older version) I am getting issues with next.js SSR and turbo mode for dev.
When you enable turbo mode the following error is thrown Cannot access 'BeaconError' before initialization.
The issue is coming from these imports (affecting all the errors) https://github.com/airgap-it/beacon-sdk/blob/master/packages/beacon-core/src/errors/AbortedBeaconError.ts#L1. Where the BeaconError is imported from the root but should be imported from the BeaconError file directly. This will solve the turbo issues for the errors, don't know if other parts of this package are affected. Webpack and turbo bundle in different ways and it the turbo way is failing right now.
To Reproduce Steps to reproduce the behavior:
- Take next.js template with beacon
- Enable
--turboflag fornext dev - See error
Cannot access 'BeaconError' before initialization
Expected (correct) behavior
The server should render fine like without Turbo.