Loading...
Loading...
TypeError: myFunction is not a functionThis error means you tried to call something as a function, but it isn't one. The variable holds a different type (string, number, object, undefined) instead of a function.
Log the variable before calling it to see its actual type.
console.log(typeof myFunction); // Should be 'function'
console.log(myFunction); // Inspect the actual valueEnsure you are using the correct import syntax for the module.
// Named export
import { myFunction } from './module';
// Default export
import myFunction from './module';