Skip to content

ES module import fails for @magic-ext/harmony in yarn PNP strict modeย #297

Open
@klngrs

Description

@klngrs

โœ… 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

  1. Create a regular webpack project
  2. Use yarn 3 in pnp strict mode
  3. Install @magic-ext/[email protected]
  4. 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 /.yarn/cache/@magic-ext-harmony-npm-3.1.0-7d7316d909-47169ad610.zip/node_modules/@magic-ext/harmony/ (see exports field in..."

๐Ÿ’ป 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions