Cannot run DB_TYPE=pg npm run watch
See original GitHub issueOS: Ubuntu 16.04 Node: v9.11.2 Nodejs: v4.2.6 NPM: 5.6.0 Postgresql: psql (PostgreSQL) 11.0 (Ubuntu 11.0-1.pgdg16.04+2)
After running the command: DB_TYPE=pg npm run watch
I get this:
@mikeworks/sql-fundamentals@0.0.0-development watch /home/anton_rich/Projects/sql/northwind scripty
Executing “/home/anton_rich/Projects/sql/northwind/scripts/watch.sh”:
#!/usr/bin/env sh ./node_modules/.bin/nodemon -x “npm run build; npm start”
[nodemon] 1.18.3
[nodemon] to restart at any time, enter rs
[nodemon] watching: /home/anton_rich/Projects/sql/northwind/src//* /home/anton_rich/Projects/sql/northwind/views//* /home/anton_rich/Projects/sql/northwind/public/**/*
[nodemon] starting npm run build; npm start
@mikeworks/sql-fundamentals@0.0.0-development build /home/anton_rich/Projects/sql/northwind scripty
Executing “/home/anton_rich/Projects/sql/northwind/scripts/build.sh”:
#!/usr/bin/env sh ./node_modules/.bin/tsc
node_modules/@types/handlebars/index.d.ts:28:9 - error TS2687: All declarations of ‘data’ must have identical modifiers.
28 data?: any; ~~~~
src/db/postgres-db.ts:77:27 - error TS2345: Argument of type ‘PoolClient’ is not assignable to parameter of type ‘Client’.
77 let pgdb = new this(client); ~~~~~~
src/db/postgres-db.ts:101:30 - error TS2339: Property ‘release’ does not exist on type ‘Client’.
101 PostgresDB.pubSubSupport.release(); ~~~~~~~
src/db/postgres-pubsub.ts:6:3 - error TS2322: Type ‘PoolClient’ is not assignable to type ‘Client’. Property ‘end’ is missing in type ‘PoolClient’.
6 return client; ~~~~~~~~~~~~~~
src/db/sqlite-db.ts:4:25 - error TS2307: Cannot find module ‘sqlite’.
4 import * as sqlite from ‘sqlite’; ~~~~~~~~
src/types/handlebars.d.ts:13:5 - error TS2717: Subsequent property declarations must have the same type. Property ‘hash’ must be of type ‘any’, but here has type ‘{ [key: string]: any; }’.
13 hash: { [key: string]: any }; ~~~~
src/types/handlebars.d.ts:14:5 - error TS2717: Subsequent property declarations must have the same type. Property ‘fn’ must be of type ‘TemplateDelegate<any>’, but here has type ‘(ctxt: any) => {}’.
14 fn: (ctxt: any) => {}; ~~
src/types/handlebars.d.ts:15:5 - error TS2687: All declarations of ‘data’ must have identical modifiers.
15 data: { ~~~~
src/types/handlebars.d.ts:15:5 - error TS2717: Subsequent property declarations must have the same type. Property ‘data’ must be of type ‘any’, but here has type ‘{ exphbs: ExpHbsState; root: { settings: any; request: Request; }; }’.
15 data: { ~~~~
src/ws.ts:54:19 - error TS2345: Argument of type ‘(this: WebSocket) => void’ is not assignable to parameter of type ‘(this: WebSocket, …args: any[]) => void’. The ‘this’ types of each signature are incompatible. Type ‘WebSocket’ is not assignable to type ‘WebSocket’. Two different types with this name exist, but they are unrelated. Property ‘isAlive’ is missing in type ‘WebSocket’.
54 ws.on(‘pong’, heartbeat); ~~~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @mikeworks/sql-fundamentals@0.0.0-development build: scripty
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @mikeworks/sql-fundamentals@0.0.0-development build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /home/anton_rich/.npm/_logs/2018-10-26T23_07_43_447Z-debug.log
@mikeworks/sql-fundamentals@0.0.0-development start /home/anton_rich/Projects/sql/northwind scripty
Executing “/home/anton_rich/Projects/sql/northwind/scripts/start.sh”:
#!/usr/bin/env sh node dist/index.js
info: Database Type: PostgreSQL (node:30291) UnhandledPromiseRejectionWarning: TypeError: winston.createLogger is not a function at Object.logger (/home/anton_rich/Projects/sql/northwind/node_modules/express-winston/index.js:195:67) at installMiddlewares (/home/anton_rich/Projects/sql/northwind/dist/express-server.js:55:28) at Object.<anonymous> (/home/anton_rich/Projects/sql/northwind/dist/express-server.js:99:9) at Generator.next (<anonymous>) at fulfilled (/home/anton_rich/Projects/sql/northwind/dist/express-server.js:4:58) (node:30291) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:30291) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [nodemon] clean exit - waiting for changes before restart
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
Worked for me after update winston package. #43
That worked. Thanks so much @mike-north!