Kurtis9
Kurtis9

Reputation: 117

vscode: Const value underlined red

type="module"> const response = await fetch("/lookup/" + 'user input').then(result =>result.json())

The const value is being underlined red by VS code, and I cannot determine the issue. Any advice?

My code does not run as expected, as it does not return a response from my backend on the front end when searched

Here is a photo of what VS code is telling me, but no 'major' errors?

enter image description here

Upvotes: 2

Views: 299

Answers (1)

FahDev
FahDev

Reputation: 357

replace:

<script>

type="module">

by:

<script type="module">

Upvotes: 4

Related Questions