question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’m trying to use this with next.js. Though I can’t because of this error:

import './polyfills.js';
       ^^^^^^^^^^^^^^^^

SyntaxError: Unexpected string

As far as I’m concerned, it’s coming from this line: import { Canvas } from 'react-three-fiber';

Anybody else managed to get it working with Next?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Mobilpaddecommented, Mar 12, 2019

Works like a charm! 😍

0reactions
drcmdacommented, Dec 17, 2019

this is b/c RO didnt export cjs. they have a beta version that does this, it’s being used in r3f@beta https://spectrum.chat/react-three-fiber/general/nextjs-build-using-react-three-fiber~535837b1-83c8-4b3b-9084-9aa8a221cef4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Next.js by Vercel - The React Framework
Production grade React applications that scale. The world's leading companies use Next.js by Vercel to build static and dynamic websites and web ...
Read more >
vercel/next.js: The React Framework - GitHub
Documentation. Visit https://nextjs.org/docs to view the full documentation. Who is using Next.js?
Read more >
Next.js (@nextjs) · Twitter
We've updated `create-next-app` with a new look. Try it out today → vercel.fyi/nextjs-templ… pic.twitter.com/Mt8EbqM…
Read more >
Next.js - Wikipedia
Next.js is an open-source web development framework created by Vercel enabling React-based web applications with server-side rendering and generating static ...
Read more >
Next.js - npm
The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects. To chat with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found