-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Broken build on 9.5.4
#17701
Comments
Looks like minimal reproduction is using After investigation this seems to be from breaking changes in v4.0.0 of |
I am also running into this issue after upgrade. The problem seems to lie in importing fonts via url:
It previously could find fonts on 9.5.3, but with 9.5.4 the css-loader cannot find these paths. |
I have this error in my css as well. using this @font-face {
font-display: swap;
font-family: 'Open Sans';
font-style: normal;
font-weight: normal;
src: local('Open Sans Regular'), local('OpenSans-Regular'), url('/static/fonts/OpenSans/OpenSans-Regular.ttf') format('truetype');
} with the ttf file being located at
|
Confirmed. Exactly my case. Thanks @UncleClapton and @spencewood for jumping in. |
Minimal reproduction repo. |
Faced with same error Error: Can't resolve '/pic/decor-top.svg' I guess problem in updated sass-loader after #16970 |
Same issues with loading fonts in SCSS files: |
I changed my SCSS variables (responsible for importing files) from "/directory" to "/public/directory" and it seems to fix the problem (for now at least) 👀 /* Directories
========================================================================== */
$dir-img: "/public/images";
$dir-fonts: "/public/fonts"; |
I cannot understand, why compiler trying to resolve absolute urls? @flayks if hack with but I do not need this. I just want to use |
Downgrading css-loader to 3.6.0 locally does resolve the issue, so #16970 indeed seems to be the cause (as mentioned by @dutchenkoOleg) [edit] it actually seems to be intended: webpack-contrib/css-loader#1153 (comment) |
Is Regardless, the release notes for the bumped
So it'd make sense to be related to this. EDIT I see that #16973, as pointed out by @dutchenkoOleg does change |
This reverts commit 7e15a57 See: vercel/next.js#17701
This is a follow-up to #16973 which adds handling for the breaking change in the latest version of css-loader that causes unresolved file references in `url` or `import` to cause the build to fail. This fixes it by adding our own resolve checking and when it fails disabling the `css-loader`'s handling of it. Fixes: #17701
Hi, this should be corrected in the latest canary of Next.js |
It's alive! |
Working great for me, as well! Thanks so much @ijjk. |
I know you guys are all over this issue, but ... I'm getting hammered with folks using my courses on Pluralsight and the examples are now completely dead. It's no different then your with-tailwindcss example when I add to the
and it expects to pick up the file from the /public folder. Instead, the app crashes with
Is there a work-a-round I can give people? Will this magically start working? I have in my package.json 9.5.4 for next version. |
You can use |
@pkellner install canary version npm i next@canary |
Thanks @timneutkens , I'm sure I have lots of other people with breaking builds who just think I uploaded broken source. When I update my package.json file to Should I immediately update all my example package.json entries to that 9.5.5 canary? Will 9.5.4 magically start working after something changes in next? I appreciate the fast work around but the next step for me is very important as I'm sure there are at least 50 people out there who are doing my demos saying WTF? Also, had I left a package-lock.json out there, would that have avoided all this? I don't ever check that lock file into my examples repo following the example of how Next setups up there examples repo (which also is broken right now) |
Hi, a new patch release |
It's totally an anti-pattern to leave "thank you" on an issue because it adds no value. But... @ijjk @timneutkens ... THANK YOU |
This reverts commit ec8e4626 See: vercel/next.js#17701
This reverts commit ec8e4626 See: vercel/next.js#17701
This reverts commit ec8e462 See: vercel/next.js#17701
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
After upgrading to
9.5.4
from9.5.3
,next build
is no longer working for me. I'm also using[email protected]
+postcss
.To Reproduce
Then it starts looping on a `MODULE_NOT_FOUND` exception
Expected behavior
Build should continue to work. No other change was introduced in the failing project.
9.5.3
solves the issue./fonts/la-brands-400-98099f67.eot
) it's actually there and has always been.next build
fails with the exact same error.System information
10.15.7
(19H2)9.5.4
v12.19.0
The text was updated successfully, but these errors were encountered: