-
Notifications
You must be signed in to change notification settings - Fork 91
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
Module parse failed: Unexpected character '�' (1:0) #92
Comments
Same happening for me too. In my case it works fine when I remove the config for |
Just narrowed down what's works vs what doesn't. Looks like I start getting this error when I add config options. This doesn't work:
This works:
|
@gisete for me it still does not work when removing optimizedImages config & next-css. Either way looks like a major bug to me. |
@geochanto just checking, did you install the individual optimization packages? After digging in a little further yesterday I realized we might be having different issues. In my case it seems like the config settings were not working because it was not accepting that I only wanted to optimize |
@gisete I did install all the optimization packages. And, since gifsicle seems to have issues of its own, I excluded gif and handled rest of the images in optimizedImages config: Were you able to get it working on your end? |
@geochanto I was! I still get the warnings in dev but no warnings in prod anymore. In my case too I was getting a In case it helps here's my next config now:
|
@gisete yes, I tried all that. Do you mind sharing a snippet how you're requiring the image in your component? Perhaps I have something wrong there. I'm testing with something like |
This is how I'm using it: I can get it to work this way because I'm using absolute paths now with this line in my next config: I think before I would have used the same way you are using it. |
OK I found the culprit... It's somewhere in my sass webpack config. Works without it. @gisete thanks for your help. |
Any updates on this? I'm still getting the same error |
For anyone reading this, I was getting the same error without using any external CSS plugin. What fixed it for me was by simply upgrading to the latest version. (v2.5.4 -> v2.6.2) |
hi stoicsleuth, which tool did you update? |
Had the same problem, my mistake was in the next-compose-plugins syntax : the nextConfig should not be in the plugins array but as a second argument to withPlugins. |
I am facing same error during compilation but I am not using next library in my project. Any one has any idea how to resolve it? |
I'm also facing this issue. Please let me know if you got the solution. Thanks. |
i am facing the same problem,i solve it !!! i am using vue,this is my previous code insinde data i put this and in template i use this to call the image resolve: and in template i use this to call the image I just remove png in data and put it in template :) |
I'm getthing this error for both dev & prod builds, for all image file types:
I've tried reinstalling dependency packages. Also tried to configure next config with and without
next-compose-plugins
but same result. My current config:The text was updated successfully, but these errors were encountered: