Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
how do I import styles in a next js page

I have a styles folder in my app and it contains a file named Home.module.css.

But whenever I add this code in my pages/index.js, i get an error, the error is always the same, 404 page not found..

import styles from '../styles/Home.module.css' 

Please help me get out of this problem.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Following documentation you should just import styles without naming it:

import '.../styles/Home.module.css'

But, if you want to use varibales you can install SASS and import your styles by name:

import variables from '../styles/variables.module.scss'

export default function MyApp({ Component, pageProps }) {
  return (
    <Layout color={variables.primaryColor}>
      <Component {...pageProps} />
    </Layout>
  )
}

NOTE: pay attention to extension. If you are using SASS the extension of file should be SCSS.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda