Using with next.js
See original GitHub issueI’m not really sure where to report this issue, but basically, the inclusion of Google image imports makes this very difficult to use with next.js (SSR).
When I follow the instructions, I end up getting
Uncaught Error: Module parse failed: node_modules\react-places-autocomplete\dist\images\powered_by_google_default.png Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
Would you happen to know anything about how to resolve this? All of the existing answers that I’ve seen involve handling images on project code, not external components.
(I personally think that the images shouldn’t really be shipped in the library and should be passed in as a prop or included as inline SVGs instead for retina support, but that’s another issue.)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:9
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Getting Started | Next.js
If you're new to Next.js, we recommend starting with the learn course. The interactive course with quizzes will guide you through everything you...
Read more >Create a Next.js App | Learn Next.js
Next.js: The React Framework · An intuitive page-based routing system (with support for dynamic routes) · Pre-rendering, both static generation (SSG) and server- ......
Read more >Setup - Create a Next.js App
You'll be using your own text editor and terminal app for this tutorial. ... the directory you'd like to create the app in,...
Read more >Basic Features: Pages - Next.js
In Next.js, a page is a React Component exported from a .js , .jsx , .ts , or .tsx file in the pages...
Read more >What is Next.js?
Next.js is a React framework that gives you building blocks to create web applications. By framework, we mean Next.js handles the tooling and...
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 Free
Top 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
For the people trying to make the package work with next you have two options:
Stay in the version 5.3.1 or install the package file-loader (or one similar) and then add the following code to your
next.config.js
fileThis won’t be an issue with v6.x or above 👍