Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I encounter: "TypeError: t(...).isPlaceholder is not a function" when "import './bootstrap/dist/css/bootstrap.min.css'"

Tags:

reactjs

I installed bootstrap via npm install already and i tried to import it to my App.js file:

import './bootstrap/dist/css/bootstrap.min.css'

But then the app return this on the browser:

TypeError: t(...).isPlaceholder is not a function Could someone please explain why and how to fix? Thank you

like image 231
Duy Hoang Avatar asked Oct 16 '22 05:10

Duy Hoang


2 Answers

For me, I saw these errors when I bumped @babel dependencies a few minor versions (several packages and plugins). What helped was removing the node_modules directory and then installing all the packages again.

  1. Remove node_modules: rm -rf ./node_modules
  2. Install packages yarn or npm i
  3. Run your project again
like image 134
xab Avatar answered Nov 15 '22 05:11

xab


I just encountered this error.

To fix it, make sure you're not mixing up your package managers. I was using yarn, but then used npm because that's what we use at work.

you should add or install your modules using the same package manager

like image 26
Ian MacFarlane Avatar answered Nov 15 '22 07:11

Ian MacFarlane