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

Can't import iframe-resizer with webpack #674

Closed
anlambert opened this issue Mar 4, 2019 · 7 comments
Closed

Can't import iframe-resizer with webpack #674

anlambert opened this issue Mar 4, 2019 · 7 comments

Comments

@anlambert
Copy link
Contributor

When I try to import the iframe-resizer module into my webpack project, using syntax require('iframe-resizer) or import iframe-resizer, I got the following error:

ERROR in ./node_modules/iframe-resizer/index.js
Module not found: Error: Can't resolve './js' in '/home/antoine/swh/swh-environment/swh-web/node_modules/iframe-resizer'
 @ ./node_modules/iframe-resizer/index.js 3:17-32
 @ ./swh/web/assets/src/bundles/vendors/index.js
 @ multi bundles/vendors/index.js

My guess is that the index file inside the js folder is named Index.js but it should be named index.js (no uppercase characters).

@davidjbradshaw
Copy link
Owner

Argh, will try and take a look this evening

@davidjbradshaw
Copy link
Owner

If you have a moment to make a PR, that will help, my day job blocks access to github :(

anlambert added a commit to anlambert/iframe-resizer that referenced this issue Mar 4, 2019
@anlambert
Copy link
Contributor Author

PR #675 opened fixing the issue (I have tested locally and the import error goes away).

@davidjbradshaw
Copy link
Owner

Cool I will publish this tonight when I get home, thanks for the help

@gavmck
Copy link

gavmck commented Mar 4, 2019

Literally came across this issue 5 minutes ago, what timing!

@davidjbradshaw
Copy link
Owner

Published as v4.0.4, sorry for the silly mistake and thanks for the help

@dev-kaan
Copy link

dev-kaan commented Oct 11, 2022

Problem persists in angular 12

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

4 participants