Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
¿Cómo puedo usar importaciones absolutas con storybook y Next.js?

En mi archivo .storybook/main.js , tengo:

 webpackFinal: async (config) => { config.resolve.modules = [ ...(config.resolve.modules || []), path.resolve(__dirname), ]; return config; },

Pero cuando ejecuto mi libro de cuentos, aparece un error:

 resolve 'components/Common/Button' in '/myprojectpath/pages' Parsed request is a module using description file: /myprojectpath/package.json (relative path: ./pages) Field 'browser' doesn't contain a valid alias configuration resolve as module /myprojectpath/pages/node_modules doesn't exist or is not a directory looking for modules in /myprojectpath/node_modules

No estoy seguro de lo que está pasando. Cuando ejecuto el proyecto Next.js, se carga bien.

¡Gracias por adelantado!

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Parece que el problema de configuración de ruta absoluta: problema de github

Lo más probable es que se resuelva con

 path.resolve(__dirname, ".."), "node_modules"]

o

 path.resolve(__dirname, "../src"), "node_modules"]
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!