Webpack 3.x and countries
See original GitHub issueHey there! I’m trying to add your module to one of my projects, but I’m getting the next error when I try to add your component to my view:
ERROR in ./node_modules/react-phone-number-input/modules/Input.js
Module not found: Error: Can't resolve './countries' in '<my-local-path>/node_modules/react-phone-number-input/modules'
@ ./node_modules/react-phone-number-input/modules/Input.js 22:0-40
@ ./node_modules/react-phone-number-input/index.js
@ ./app/consumer-support/user/user/verification-details/consumer-details-modal/index.js
@ ./app/consumer-support/user/user/verification-details/index.js
@ ./app/consumer-support/user/user/index.js
@ ./app/consumer-support/user/index.js
@ ./app/consumer-support/index.js
@ ./app/index.js
@ ./app/render.js
@ ./index.js
@ multi webpack-hot-middleware/client?path=http://localhost:4000/__webpack_hmr react-hot-loader/patch babel-polyfill bootstrap-sass/assets/javascripts/bootstrap ./index
When I change the line 22 in ./node_modules/react-phone-number-input/modules/Input.js
from import country_names from './countries';
to import country_names from './countries.json';
everything works, am I missing something or?
Webpack version: 3.0.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
To v2 or v3 from v1 - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >How to not rely on relative paths in React/Webpack 3 app
My project's main folder is called app . I've tried both of these in my webpack.config.babel.js but with no luck so far. 3.x...
Read more >Issue loading with Webpack 3.5.5 #61 - GitHub
This might be a config issue on my side, but thought I'd mention it. webpack:///./node_modules/i18n-iso-countries/index.js?:43 codes.
Read more >Understanding a Comparison: Webpack vs ViteJS - Radixweb
Enhanced Performance of Vite JS. Vite uses modern web browsers that allow native ESM modules to drastically reduce startup and rebuild times.
Read more >Starting the agent | APM Node.js Agent Reference [3.x] - Elastic
optionally exclude other modules from the bundle that you would like the APM agent to instrument. "Excluding" a module foo from the bundle...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’re not the first one and you’re not the last one
Awesome! Thanks for helping, after adding
.json
in extensions array, everything is working as expected! 😄