Giter VIP home page Giter VIP logo

photo-album's People

Contributors

yugasun avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

photo-album's Issues

npm run dev:server报错

描述

我按照文档操作,执行npm run dev:server的时候,先是出现 ts-node 报错。
于是我安装了 ts-node,重复执行命令,出现以下报错:

➜ npm run dev:server  

> [email protected] dev:server
> NODE_ENV=development ts-node src/server.ts

(node:10467) [SEQUELIZE0002] DeprecationWarning: The logging-option should be either a function or false. Default: console.log
(Use `node --trace-deprecation ...` to show where the warning was created)
[Sequelize] Try to create database photo-album
ConnectionRefusedError [SequelizeConnectionRefusedError]: connect ECONNREFUSED 127.0.0.1:5432
    at ConnectionManager.connect (/Users/cooper/github_project/photo-album/node_modules/sequelize/lib/dialects/mysql/connection-manager.js:116:17)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ConnectionManager._connect (/Users/cooper/github_project/photo-album/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:318:24)
    at /Users/cooper/github_project/photo-album/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:250:32
    at ConnectionManager.getConnection (/Users/cooper/github_project/photo-album/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:280:7)
    at /Users/cooper/github_project/photo-album/node_modules/sequelize/lib/sequelize.js:613:26
    at Object.initDatabase (/Users/cooper/github_project/photo-album/src/sequelize.ts:42:7)
    at initServer (/Users/cooper/github_project/photo-album/src/server.ts:12:3) {
  parent: Error: connect ECONNREFUSED 127.0.0.1:5432
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16) {
    errno: -61,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 5432,
    fatal: true
  },
  original: Error: connect ECONNREFUSED 127.0.0.1:5432
      at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16) {
    errno: -61,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '127.0.0.1',
    port: 5432,
    fatal: true
  }
}
  App is running at http://localhost:3000 in development mode
  Press CTRL-C to stop

而 docker 的 dashboard 里面,mysql 是红色未启动状态。
image

环境

macOS bigsur
nodejs 16.1.0
npm 7.12.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.