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

870
Views
Laravel Ui bootstrap, bootstrap no está definido

He creado un nuevo proyecto laravel new project proyecto laravel

E instaló bootstrap ui así:

 php artisan ui bootstrap

Luego compilado con:

 npm install npm run dev

Pero cuando uso bootstrap dentro de app.js así:

 require('./bootstrap'); var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl) });

La consola muestra el siguiente error:

 app.js?e348:5 Uncaught ReferenceError: bootstrap is not defined at eval (app.js?e348:5:5) at Array.map (<anonymous>) at eval (app.js?e348:4:38) at Object../resources/assets/js/app.js (app.js:973:1) at __webpack_require__ (app.js:1060:42) at app.js:1214:86 at Function.__webpack_require__.O (app.js:1097:23) at app.js:1217:53 at app.js:1219:12

Debo mencionar que ejecuto npm run dev después de realizar cambios en cualquier archivo de recursos, y sé acerca de npm run watch .

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Ok, resolví el problema de esta manera:

en el archivo resources/js/bootstrap.js :

 window._ = require('lodash'); try { window.$ = require('jquery'); window.bootstrap = require('bootstrap'); } catch (e) { console.error(e); }

observe la línea: window.bootstrap = require('bootstrap');

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!