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

Upgrade to 9.5.4 broke CSS url loading #17734

Closed
diakonos opened this issue Oct 9, 2020 · 4 comments
Closed

Upgrade to 9.5.4 broke CSS url loading #17734

diakonos opened this issue Oct 9, 2020 · 4 comments

Comments

@diakonos
Copy link

diakonos commented Oct 9, 2020

Bug report

Describe the bug

After updating to 9.5.4 (and with no other code changes to our project) the site fails to render. The logs indicate it cannot locate a resource referenced from our CSS via the url function.

The affected file is an SCSS file, and the line is: background-image: url('/icons/profile_light.svg');

This file does exist in the public folder, and I can access it directly in the browser.

To Reproduce

Expected behavior

I'm expecting that my CSS works just like in 9.5.3.

Screenshots

System information

  • OS: macOS
  • Version of Next.js: 9.5.4
  • Version of Node.js: 12.16.3
  • Version of npm: 6.14.8

Additional context

Server logs:

justin@macbook % npm run dev

> next dev

Loaded env from /path/.env.local
ready - started server on http://localhost:3000
info  - Using external babel configuration from /path/.babelrc
event - compiled successfully
event - build page: /[lang]
wait  - compiling...
error - ./components/menus/main/styles.module.scss (./node_modules/next/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-3-1!./node_modules/next/dist/compiled/postcss-loader??__nextjs_postcss!./node_modules/resolve-url-loader??ref--5-oneOf-3-3!./node_modules/sass-loader/dist/cjs.js??ref--5-oneOf-3-4!./components/menus/main/styles.module.scss)
Error: Can't resolve '/icons/profile_light.svg' in '/path/components/menus/main'
Could not find files for /[lang] in .next/build-manifest.json
Could not find files for /[lang] in .next/build-manifest.json
@robksawyer
Copy link

Yeah, it's causing us problems too. I'm getting some font loading issues.

./styles/fonts.css
Error: Can't resolve '/fonts/GalanoGrotesque-Bold.woff2' in '/Users/me/Sites/MySite/my-site/styles'
    at runMicrotasks (<anonymous>)

@ijjk
Copy link
Member

ijjk commented Oct 9, 2020

Hi, this is a duplicate of #17701 and #17728 and should be resolved in the latest canary of Next.js v9.5.5-canary.0 please upgrade and give it a try!

I'm going to close this since it's a duplicate issue

@ijjk ijjk closed this as completed Oct 9, 2020
@robksawyer
Copy link

That did the trick for me. Been working on this for hours. Thanks!

@balazsorban44
Copy link
Member

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.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants