question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run DB_TYPE=pg npm run watch

See original GitHub issue

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:

@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:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Oodminchegcommented, Nov 6, 2018

Worked for me after update winston package. #43

0reactions
mangosingcommented, Dec 10, 2018

That worked. Thanks so much @mike-north!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why 'npm run watch' gives error in laravel? - Stack Overflow
Run these two lines, they were working for me. $ npm config rm proxy $ npm config rm https-proxy. Then, go for your...
Read more >
npm run watch does not work · Issue #2861 · laravel-mix ...
I cannot run npm run watch . I have written all scripts and config file webpack.mix.js . I want to use laravel-mix with...
Read more >
[5.4] npm run watch not working - Laracasts
Using 5.4 and mix, when I run npm run watch it compiles once and looks like it ... I make changes to any...
Read more >
npm-watch
Start using npm-watch in your project by running `npm i npm-watch`. There are 168 other projects in the npm registry using npm-watch.
Read more >
Working with the AWS CDK in TypeScript
To compile your TypeScript app manually, issue npm run build . You may also issue npm run watch to enter watch mode, in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found