New Viewer ReferenceError: exports is not defined


I’m receiving a “ReferenceError: exports is not defined” console error when trying to setup the new Viewer API. The offender being AbstractCamera.js:77.

I’m using Webpack and React. Any insight here would be greatly appreciated?

Also, is showing a 404 page. I thought it might be more appropriate to post this as an issue there.



The new help center is the best place to get documentation about the viewer, and it is appropriate to post any issues you find in this forum.

Could you create a code sandbox that produces the issue you are mentioning? In parallel, we are working on a React template that we will soon add to the documentation.

Thanks, the new help center is quite helpful.

I was hoping someone might have encountered and solved a “ReferenceError…” issue in React with Webpack - to make my life easier. I also didn’t know you had documented a Webpack setup.

As I might be the only one with this issue, I think there’s a good chance the problem lies in my setup. I’m using Webpack and React… via Webpacker (Ruby on Rails) which includes Babel and uses Yarn… there’s a lot more troubleshooting I can do on my end.

This has been solved. It was a setup issue on my end.