kabirbaidhya / kabirbaidhya/react-todo-app
Compile error after changing branch and running the application
- Dominant language
- JavaScript
- Stars
- 269
- Forks
- 506
- PR merge metrics
- No merged PRs in 30d
Description
After I checkout to branch-0, I have run the command:
```bash
npm start
```
and the error which is displayed in the browser is the following :
```
Failed to compile.
Error in ./src/reportWebVitals.js
Syntax error: 'import' and 'export' may only appear at the top level (3:4)
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
> 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
| ^
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
@ ./src/index.js 19:23-51
```
Are we supposed to edit any parts of code to be able to run correctly ?
I was using the repository as a tutorial.
Thank You
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.