正确导入节点模块

时间:2020-11-11 18:07:31

标签: javascript node.js

我是新手,正在学习NodeJS并收到错误消息未找到模块。请帮助我尝试查找原因。

app.js

const getNotes = require('./notes.js')
const msg = getNotes();
console.log(msg)

notes.js

const getNotes= function (){

    return 'My notes are publishing'
}
module.exports = getNotes

0 个答案:

没有答案