-
Notifications
You must be signed in to change notification settings - Fork 111
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Unable to use package. Keep getting "Module not found" or "No exported member" errors.
I have tried both npm and yarn, with CRA and vite.
Steps to reproduce
-
Initiate a basic application:
npx create-react-app learn-leo
-
Install package
npm i @adobe/leonardo-contrast-colors
-
Import Leonardo Package:
// App.js
import * as Leo from "@adobe/leonardo-contrast-colors"
-
Run application:
npm start
-
Resulting error:
Failed to compile.
Module not found: Error: Can't resolve '@adobe/leonardo-contrast-colors' in '/Users/username/Development/learn-leo/src'
ERROR in ./src/App.js 6:0-50
Module not found: Error: Can't resolve '@adobe/leonardo-contrast-colors' in '/Users/username/Development/learn-leo/src'
webpack compiled with 1 error
Expected behavior
Expected to be able to import and use the leonardo package.
Screenshots
Leonardo package and version
@leonardo-contrast-colors version: ^1.0.0-alpha.16
Environment
- Browser(s) and OS(s):
OS: MacOS: 12.5.1
Browseer: Version 104.0.5112.101 (Official Build) (arm64)
Additional context
It appears that there may be something wrong with the exposed modules/files for export.
The package may have incorrect main/module/exports specified in its package.json.
UPDATE: I've tested with Version 1.0.0-alpha.13
and I am no longer seeing this error. It must have something to do with the latest release.
elyulka, matiasbenedetto, mahmoudilyan, tsironis and dariod
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working