Node not running a .js -file

Hi. I have the file app.js in the first-app folder. I have implemented the given code from the respective lecture in the file:

function sayHello(name) {
console.log('Hello ’ + name);
}

sayHello(‘Mosh’);

But in terminal this happens:

Jero-MBP:first-app jerojarvenpaa$ node app.js
Module {
id: ‘.’,
path: ‘/Users/jerojarvenpaa/Downloads/node-course/first-app’,
exports: {},
parent: null,
filename: ‘/Users/jerojarvenpaa/Downloads/node-course/first-app/app.js’,
loaded: false,
children: [],
paths: [
‘/Users/jerojarvenpaa/Downloads/node-course/first-app/node_modules’,
‘/Users/jerojarvenpaa/Downloads/node-course/node_modules’,
‘/Users/jerojarvenpaa/Downloads/node_modules’,
‘/Users/jerojarvenpaa/node_modules’,
‘/Users/node_modules’,
‘/node_modules’
]
}
// The version:
Jero-MBP:first-app jerojarvenpaa$ node --version
v14.17.3

Thank you for fix suggestions.

That’s the kind of output I’d expect if you had this in your script:

console.log(module)

But I don’t see anything like that in your snippet. What if you try a new file, maybe test.js, same problem?

Thank you for your answer. It ended up helping me figure out what was wrong. I had made two mistakes. I was unaware that of the fact that I had made a duplicate folder during the course, which I mistakenly was accessing instead of the folder with the files with the most recently written program. This file I was accessing had the console.log(module); -line.
The second mistake, which was the reason I had to track back to implement older code that I had previously been able to execute, was that I hadn’t given my user the permission to use the downloads folder through terminal (I expect this is due to the newest MacOs update). I didn’t upload the errors logged by this mistake.

-Jero