New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot run DB_TYPE=pg npm run watch #94
Comments
I'm getting something somewhat similar on macOS: OS: MacOS v10.14 I read in another issue that $ DB_TYPE=pg npm run watch
> @mikeworks/sql-fundamentals@0.0.0-development watch /Users/alistair/Projects/sql
> scripty
Executing "/Users/alistair/Projects/sql/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: /Users/alistair/Projects/sql/src/**/* /Users/alistair/Projects/sql/views/**/* /Users/alistair/Projects/sql/public/**/*
[nodemon] starting `npm run build; npm start`
> @mikeworks/sql-fundamentals@0.0.0-development build /Users/alistair/Projects/sql
> scripty
Executing "/Users/alistair/Projects/sql/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/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! /Users/alistair/.npm/_logs/2018-11-03T18_39_00_741Z-debug.log
> @mikeworks/sql-fundamentals@0.0.0-development start /Users/alistair/Projects/sql
> scripty
Executing "/Users/alistair/Projects/sql/scripts/start.sh":
> #!/usr/bin/env sh
> node dist/index.js
info: Database Type: PostgreSQL
(node:97418) UnhandledPromiseRejectionWarning: TypeError: winston.createLogger is not a function
at Object.logger (/Users/alistair/Projects/sql/node_modules/express-winston/index.js:195:67)
at installMiddlewares (/Users/alistair/Projects/sql/dist/express-server.js:55:28)
at Object.<anonymous> (/Users/alistair/Projects/sql/dist/express-server.js:99:9)
at Generator.next (<anonymous>)
at fulfilled (/Users/alistair/Projects/sql/dist/express-server.js:4:58)
(node:97418) 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:97418) [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 Here is the contents of the log file:
|
killall -9 node |
Have the same issue on Ubuntu 18 :( |
Worked for me after update winston package. #43 |
Updating the Winston package, running |
Yes, running and npm upgrade and and update winston package helped. |
This should be good to go, now that renovate bot keeps dependencies (including winston) up-to-date |
Any fix found for this. I am on a Mac and still get errors, the code is below.
|
@mangosing These look very similar to some bugs I fixed yesterday. Can you verify that you've pulled in the latest changes from master, removed If so, please open a new issue, and I'll be sure to give it some attention |
That worked. Thanks so much @mike-north! |
OS: 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:
Executing "/home/anton_rich/Projects/sql/northwind/scripts/watch.sh":
[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
Executing "/home/anton_rich/Projects/sql/northwind/scripts/build.sh":
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', 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
Executing "/home/anton_rich/Projects/sql/northwind/scripts/start.sh":
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. (/home/anton_rich/Projects/sql/northwind/dist/express-server.js:99:9)
at Generator.next ()
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
The text was updated successfully, but these errors were encountered: