@CodeKazuko wrote:
Yesterday, there wasn’t a bug but I forget that I have corvdo install and try to install again. Is it due to reinstalling causing the error
The error file
‘’’
C:\Program Files\nodejs\node.exe src\components\quiz\QuizInstructions.jsc:\Users\hille\Desktop\corona-attack\src\components\quiz\QuizInstructions.js:1
import React, { Component, Fragment } from ‘react’;
^^^^^^SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:1072:16)
at Module._compile (internal/modules/cjs/loader.js:1122:27)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
‘’’
This is my code below
‘’’
import React, { Component, Fragment } from ‘react’;import { Link } from ‘react-router-dom’;
import { Helmet } from ‘react-helmet’;
const QuizInstructions = () =>(
<Fragment> <Helmet><title> Quiz Instructions </title></Helmet> <div className = "instructions container"> <h1>How to Play</h1> <p>Please read these instructions completely.</p> <ul className="browser-default" id="main-list"> <li>The game has a timer of 5 minute and ends when timer ends.</li> <li>Each game consists of 9 questions.</li> <li>Each question contains 4 choices.</li> <li>Select the option which best answers the question by choosing it.</li> <li>>Each game has two types of hint: <ul id="sublist"> <li> 1 50-50 chances</li> <li> 3 Hints</li> </ul> </li> <li> Selecting a 50/50 chance by clicking the icon will remove 2 incorrect answers, thus leaving the correct answer and wrong answer. </li> <li> Using a hint by clicking the icon will remove one wrong answer. You can use as many hints available on the question. </li> <li>You can exit at any time of the game. Your score will be shown shortly after exiting.</li> <li>The timer start once the game loads</li> <li>We shall see how prepared are you for Corona-19.</li> </ul> </div> </Fragment>
);
export default QuizInstructions;
‘’’
Posts: 1
Participants: 1