NodeJS uses CommonJS Module syntax which doesn't support import/export, but instead requires to use module.exports like so:
// In index.js file
function addition(a, b) {
return a + b;
}
module.exports = addition;
// In test.js file
const addition = require("./index.js");
console.log(addition(5, 4));
To use the modern import/export syntax with NodeJS you have to set your package type to module in the package.json file, like you are told in the console output.
https://nodejs.org/api/esm.html#esm_differences_between_es_modules_and_commonjs