score:3

with

import addname from "util";

you're importing the default export from util. but what you exported was a named export here:

export function addname(name) {

either use a default export instead:

export default function addname(name) {

or import the named one instead:

import { addname } from 'util';

Related Query

More Query from same tag