Skip to content

Uncaught ReferenceError: React is not defined #120

@Crunchyman-ralph

Description

@Crunchyman-ralph

Issue summary

Write a short description of the issue here ↓

Get this error:

Uncaught ReferenceError: React is not defined

When trying to import a React Component into index and trying to import that index inside a page

.
├── ...
├── components                 
│   ├── ProductsCard         
│           ├── index.tsx
│           └── ProductsCard.tsx
└── ...

Expected behavior

What do you think should happen?

Should be able to compile correctly

Actual behavior

What actually happens?

Uncaught ReferenceError: React is not defined

Steps to reproduce the problem

  1. Create a Directory inside components ProductsCard for example
  2. create an index.tsx file with import * from './ProductsCard'
  3. import {ProductsCard} from 'frontend/components/ProductsCart' inside pages/index.tsx
  4. Will get an error Uncaught ReferenceError: React is not defined

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

Specifications

  • Browser: Chrome
  • Device: Computer
  • Operating System: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions