magic-js
magic-js copied to clipboard
ES module import fails for @magic-ext/harmony in yarn PNP strict mode
✅ Prerequisites
- [yes] Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
- [yes] Are you running the latest SDK version?
- [yes] Are you reporting to the correct repository (
magic-sdk
)?
🐛 Description
The following fails during compile:
import { HarmonyExtension } from "@magic-ext/harmony";
🧩 Steps to Reproduce
- Create a regular webpack project
- Use yarn 3 in pnp strict mode
- Install @magic-ext/[email protected]
- Attempt to import it with
import { HarmonyExtension } from "@magic-ext/harmony";
🤔 Expected behavior
The project should compile and import the harmony extension properly.
😮 Actual behavior
Error:
"Module not found: Error: Can't resolve '@magic-ext/harmony' in ..."
or
"Package path ./dist/es/index.js is not exported from package
💻 Code Sample
N/A
🌎 Environment
Software | Version(s) |
---|---|
@magic-ext/harmony |
3.1.0 |
magic-sdk |
8.0.1 |
Browser | Brave |
yarn |
3.1.1 |
Operating System | Mac |
Proposed PR for a fix: https://github.com/magiclabs/magic-js/pull/298
@harryEth