Error in Vercel deployment with OffCanvas

50 views Asked by At

From the beginning of my project, in visual studio I have added Bootstrap to my project, and using the offcanvas component for my react app. If I run my project in localhost I have no problem and the off canvas works. But now I have decided to host my React project on Vercel. So I connected my GitHub add the repository and form Vercel select the folder where my project is. At the moment that I start the deploy on Vercel, in the first section "Building", I receive an error:

Failed to compile. Module not found: Error: Can't resolve 'react-bootstrap/OffCanvas' in '/vercel/path0/src/components' Error: Command "npm run build" exited with 1

I have no idea of why i recieve this error. Please help me :)

I have tried to reinstall Bootstrap from my project and update it on GitHub but nothing changed. I have also tried to reinstall node_modules and execute this command npm run build. Nothing changed--Vercel shows me the same error.

0

There are 0 answers