layer5 icon indicating copy to clipboard operation
layer5 copied to clipboard

Syntax error "Identifier 'React' has already been declared. (4:7)" in 'layer5io-sisten/site/gatsby-browser.js"'

Open IhorLazarkov opened this issue 7 months ago β€’ 2 comments

Description

Syntax error "Identifier 'React' has already been declared. (4:7)" in 'layer5io-sisten/site/gatsby-browser.js"'

STEPS

  1. cd site/
  2. make setup
  3. make site ==> ERROR UNKNOWN

Syntax error in "/Users/ilazarkov/Development/VSCodeProjects/layer5io-sisten/site/gatsby-browser.js": Identifier 'React' has already been declared. (4:7) 2 | import { ThemeProvider } from './src/components/Theme'; 3 | import './src/styles/global.css';

4 | import React from "react"; | ^ 5 | 6 | export const wrapRootElement = ({ element }) => <ThemeProvider>{element}</ThemeProvider>; 7 |

Expected Behavior

The site successfully started

Screenshots

Image

Environment:

  • Host OS: macOS Sequoia v15.5
  • Browser:

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

IhorLazarkov avatar Jun 13 '25 00:06 IhorLazarkov

Hi @M-DEV-1 would you please assign this issue to me?

I read the CONTRIBUTING.md and by removing duplicate Reac import it worked for me.

Thank you.

IhorLazarkov avatar Jun 13 '25 00:06 IhorLazarkov

Provided PR https://github.com/layer5io/sistent/pull/1077

Screenshot of a fix

make site

Image

IhorLazarkov avatar Jun 14 '25 00:06 IhorLazarkov

Hi, I'd love to work on this issue. Is it still up for grabs?

ayush14189 avatar Jun 21 '25 05:06 ayush14189

Hi, I'd love to work on this issue. Is it still up for grabs?

It's been fixed and it's being merged (the PR is approved but not merged). Once the OR is merged I'll close this issue. If you are looking out for issue I would recommend to explore around the site package I think there are things can be found and improved/fixed.

IhorLazarkov avatar Jun 21 '25 14:06 IhorLazarkov