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.

React is not defined (running dashboard development server)

See original GitHub issue

By running the dashboard development server: pnpm run dashboard:start

I get “Uncaught ReferenceError: React is not defined” errors on my browser (see attachment)

image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

2reactions
leorossicommented, Oct 27, 2022

Couldn’t reproduce it on latest main. Can you please give some more infos?

Try to delete vite cache with rm -rf node_modules/.vite

1reaction
leorossicommented, Nov 3, 2022

We had this problem in another internal project, and solved with the explicit import.

Problem is: I still don’t have this on this dashboard and that’s a mystery. I am running Node v18 but I don’t think that’s it.

Anyway soon we’ll migrate very soon to a dashboard built with @platformatic/ui-components and problem will be solved, hopefully 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught ReferenceError: React is not defined - Stack Overflow
Possible reasons are 1. you didn't load React.JS into your page, 2. you loaded it ...
Read more >
Uncaught ReferenceError: React is not defined in production ...
This error happens only in production build and not in the dev server.
Read more >
How to solve "window is not defined" errors in React and Next.js
A different solution is to load your Scroll component using dynamic imports and the srr: false option. This way your component won't even...
Read more >
React Router DOM: How to handle routing in web apps
React Router DOM contains the DOM bindings for React Router. Learn about its essential components and how to build routes with parameters.
Read more >
Set up React App with Webpack, Webpack Dev Server and ...
And then all we have to do is just run npm run start . And that's it. That's all you have to do...
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