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

370
Views
react js webpack arroja un error Módulo no encontrado: Error: no se puede resolver 'src/content/Login/LoginAuthentication'

Estoy usando web "webpack": "^5.74.0" en mi proyecto React js.

cuando ejecuto npm start webpack arroja el siguiente error

 ERROR in ./src/layouts/SidebarLayout/Sidebar/SidebarMenu/items.ts 21:0-83 Module not found: Error: Can't resolve 'src/content/Login/LoginAuthentication' in 'E:\project\src\layouts\SidebarLayout\Sidebar\SidebarMenu' @ ./src/layouts/SidebarLayout/Sidebar/SidebarMenu/index.tsx 7:0-32 77:14-27 @ ./src/layouts/SidebarLayout/Sidebar/index.tsx 10:0-40 40:32-43 56:34-45 @ ./src/layouts/SidebarLayout/index.tsx 7:0-32 24:33-40 @ ./src/router/PrivateRoute.tsx 11:0-53 135:29-42 148:29-42 167:29-42 234:29-42 259:29-42 @ ./src/router/index.tsx 4:0-42 5:13-25 @ ./src/App.tsx 5:0-30 17:33-39 @ ./src/index.tsx 4:0-24 18:36-39

webpack arroja este error cada vez que importo algo como esto 'src/content/Login/LoginAuthentication'

no hay errores cuando importo así '../../folder1/filename'

El archivo de configuración del paquete web recibe un golpe:

 const path =require('path'); const HtmlWebpackPlugin =require('html-webpack-plugin') const DirectoryNamedWebpackPlugin = require("directory-named-webpack-plugin"); module.exports={ entry:path.resolve(__dirname,'..','./src/index.tsx'), resolve:{ extensions:['.tsx','.ts','.js'] }, module:{ rules:[{ test:/\.(ts|js)x?$/, exclude:/node_modules/, use:[ { loader:'babel-loader' } ] },{ test:/\.(sass|css|scss)$/, use:['style-loader','css-loader'] }, { test: /\.(png|svg|jpg|jpeg|gif)/, type: 'asset/resource' },{ test: /\.(png|svg|jpg|jpeg|gif)/, type: 'asset/inline' } // ,{ // test: /\.(png|svg|jpg|jpeg|gif|ico)$/, // exclude: /node_modules/, // use: ['file-loader?name=[name].[ext]'] // ?name=[name].[ext] is only necessary to preserve the original file name // } ] }, output:{ path:path.resolve(__dirname,'..','./dist'), filename:'bundle.js' }, plugins:[new HtmlWebpackPlugin({ template:path.resolve(__dirname,'..','./public/index.html') }) ] }

i hay alguna manera de resolver esto? no puedo cambiar las importaciones porque hay demasiadas importaciones

about 4 years ago · Juan Pablo Isaza
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!