Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stackedCards with node.js & webpack #8

Open
heeplr opened this issue Dec 27, 2020 · 0 comments
Open

stackedCards with node.js & webpack #8

heeplr opened this issue Dec 27, 2020 · 0 comments

Comments

@heeplr
Copy link

heeplr commented Dec 27, 2020

Sorry if this is a newbie question.
I'm trying to use stackedCards with

$ yarn add junedchhipa/stacked-cards
yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ stackedCards@1.0.0
info All dependencies
└─ stackedCards@1.0.0
Done in 7.94s.

and then adding ìmport 'stackedCards'; to my main.js

But webpack complains:

ERROR in ./src/main.js 3:0-22
Module not found: Error: Can't resolve 'stackedCards' in '/home/web/mySite/src'

The repository is inside /home/web/node_modules/stackedCards/...

I suppose I forgot something or did something stupid and it's probably not an issue with this project. Since I couldn't find a solution to this, I hope to find help here.

How's the right way to use stackedCards with webpack and node.js?

EDIT: I also tried to import 'stackedCards/src/stackedCards.js' directly. The webpack error then disappears but then the Browswer complains with Uncaught ReferenceError: stackedCards is not defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant