Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Design Prototyping in the Browser Design Patterns Image Carousels

Andrew Lim
Andrew Lim
8,004 Points

carousel not working - console error says it is popper.js.

I am having trouble with the carousel in this tutorial. From the console it says there is an error with the popper.js

Uncaught SyntaxError: Unexpected token export [popper.min.js:4] bootstrap.min.js:6 Uncaught Error: Bootstrap dropdown require Popper.js (https://popper.js.org) at bootstrap.min.js:6 at bootstrap.min.js:6 at bootstrap.min.js:6

From what I can find online, it says that you have to download popper.js and use the version within the umd folder [https://stackoverflow.com/questions/45743072/still-getting-uncaught-error-bootstrap-dropdown-require-popper-js-even-after]

Does this mean that the workspace will not work for this tutorial? Has anyone else got it to work?

1 Answer

Tom Parkes
Tom Parkes
7,631 Points

Hi Andrew,

The carousel worked in my Workspace without any problems - I haven't amended anything, and followed the video exactly.

popper.js is not required for the carousel to function, so I would suggest that you comment out the following line before the closing body tag in your index.html file:

<script src="js/popper.min.js"></script>

If this doesn't work, perhaps try deleting it entirely. As long as you are still linking to the jQuery and Bootstrap .js files, all other functionality should be fine.

I'm afraid I'm not familiar with popper.js, so can't help with the exact error message that you are seeing, but removing this line of code won't prevent your carousel from working and you may find that you no longer receive the error message.

I hope this helps.

Tom.