please check the error below:
node:internal/process/esm_loader:40
internalBinding(‘errors’).triggerUncaughtException(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module ‘D:web devscrimbamobile appfunctions’ imported from D:web devscrimbamobile appindex.js
Did you mean to import ../functions.js?
Given below is the code I’m trying to run: (Index.html, index.js, functions.js)
<!doctype html>
<html>
<head>
<title>Reel Time</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300&family=Ultra&display=swap" rel="stylesheet">
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container">
<h1>Reel Time</h1>
<div class="field">
<input type="text" id="input-field" placeholder="Pulp Fiction">
<button id="add-button">+</button>
</div>
</div>
<script src="index.js" type="module"></script>
<script src="functions.js" type="module"></script>
</body>
</html>
//const readlineSync = require (readlineSync)
import { add } from "./functions"
console.log(add(20,30))
const appSettings = {
databaseURL: "https://playground-91206-default-rtdb.asia-southeast1.firebasedatabase.app/"
}
const inputFieldEl = document.getElementById("input-field")
const addButtonEl = document.getElementById("add-button")
addButtonEl.addEventListener("click", function() {
let inputValue = inputFieldEl.value
console.log(`${inputValue} added to database`)
})
//const readlineSync = require (readlineSync)
export function add(a,b) {
return a + b
}