I´ve this error on my code
Typerror: ProjectRepository is not a constructor at main.....
This is the code from main.js
const Promise = require('bluebird')
const AppDAO = require('./dao')
const ProjectRepository = require('./project_repository')
const TaskRepository = require('./task_repository')
function main() {
const dao = new AppDAO('./database.sqlite3')
const blogProjectData = {name: 'Write Node.js - SQLite Tutorial'}
const projectRepo = new ProjectRepository(dao)
const taskRepo = new TaskRepository(dao)
let projectId
This is project_repository.js class with the constructor
class ProjectRepository{
constructor(dao){
this.dao = dao
}
It's very simple but I´ve no idea why it´s failing.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.