Reputation: 3
I am receiving the following error when starting the dev server:
The code for gatsby-browser.js is
import { rootWrapper } from "./root-wrapper";
export const wrapPageElement = rootWrapper;
and the code for root-wrapper.js is:
import React from 'react';
import { Layout } from "./src/components/layout";
export const rootWrapper = ({ element }) => {
return <Layout>{element}</Layout>;
};
Any thoughts on what would be causing this error? I've never seen the pink/red bars in an error on VS Code before.
Upvotes: 0
Views: 229
Reputation: 11293
Check character encoding of that file (bottom right corner of status bar), what does it read?
Alternatively try to change the encoding: either by clicking that status bar item or invoking Change File Encoding
command and then Save with Encoding
, then choose UTF-8
(that one without BOM).
Upvotes: 2
Reputation: 469
I believe this is due to an extension running within your VSCode environment?
Try disabling any extensions you have first, especially ones that relate to your project and syntax
Upvotes: 0