node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

Node V6 Incompatibility?

Open KZRepository opened this issue 10 years ago • 12 comments

I tried building our environment with Node V6.2. We had been using Node V5.7 but since have tested with Node V5.9.1. The app has been developed under Windows 10 and deployed under Ubuntu 15.10 moving to 16.04 LTS.

Under Node V6 we hit 3 problems:

  1. Postgres 9.4 and 9.5.3 returned password authentication failure
  2. PM2 1.0.2 would not return after starting a process
  3. When trying to debug under Webstorm 16.1.2 on Windows, the it failed with a "ReferenceError: v8debug is not defined".

All the problems disappeared when reverting to Node v5.9.1

The Webstorm problem is still outstanding with a workaround adding --expose-debug-as=v8debug to "Node parameters" buried on their issues database.

PM2 has a fix in 1.1.3 (not in Ubuntu package repository at this time) labeled "node v6 compat" that consists of removing a call to hasOwnProperty in a wrapper around a cloning function.

Is this a known node-postgres to Node v6 compatibility issue?

KZRepository avatar May 24 '16 00:05 KZRepository

Sorry for the issue @stretchKids - can you provide a code sample that works on node v5 but does not work on node v6? This is high on my list to look at.

On Monday, May 23, 2016, Vitaly Tomilov [email protected] wrote:

Please research before opening issues. This has been duplicated so many times by now.

  • #1000 https://github.com/brianc/node-postgres/issues/1000
  • #1019 https://github.com/brianc/node-postgres/issues/1019
  • #1003 https://github.com/brianc/node-postgres/issues/1003

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/brianc/node-postgres/issues/1029#issuecomment-221140246

brianc avatar May 24 '16 01:05 brianc

I had a similar issue when upgrading from node 5.x to 6.x and was able to fix it just by deleting node_modules folder, running npm install and redeploying the app.

apkoponen avatar May 25 '16 09:05 apkoponen

@apkoponen : In short you have just updated to newer release where bug has been solved :)

I can confirm that I've experienced the same issue before pulling 6fddc566f09cf6b5919638a6f69c251e20437b75 that resolves it.

BornaP avatar May 25 '16 11:05 BornaP

Yup.

apkoponen avatar May 25 '16 16:05 apkoponen

I hade this problem as well, but it was solved by updating to version 5.0.0.

Postgres 9.4 and 9.5.3 returned password authentication failure

LinusU avatar Jun 09 '16 16:06 LinusU

I have this "v8debug is not defined" problem with 6.2.0, but reinstalling the node modules didn't help.

jtiscione avatar Jun 15 '16 18:06 jtiscione

I have installed node-postgres on node v6 and v5 a whole bunch - never had any issues. I think it's something w/ your environment. Have you tried deleting node_modules?

brianc avatar Jun 15 '16 22:06 brianc

I figured it out- the correct node option to use (on node 6.2.0) is: --expose-debug-as=v8debug

jtiscione avatar Jun 16 '16 03:06 jtiscione

Weird - I don't have to do that. I just have 6.2 and i do npm i pg and it "just works" - are you doing something fancy w/ pg that would require exposing dbug?

On Wed, Jun 15, 2016 at 10:38 PM, Jason Tiscione [email protected] wrote:

I figured it out- the correct node option to use (on node 6.2.0) is: --expose-debug-as=v8debug

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/brianc/node-postgres/issues/1029#issuecomment-226380476, or mute the thread https://github.com/notifications/unsubscribe/AADDoXCQlm2R4DoyT7atlNvJyRDGCdYRks5qMMUrgaJpZM4Ik_W4 .

brianc avatar Jun 16 '16 03:06 brianc

Whoops- I didn't see the part of the original post where he mentions his Webstorm problem being fixed by "--expose-debug-as=v8debug". Since I'm also using Webstorm I figure it must be a bug on their end. (The problems with Postgres and PM2 look like a separate issue.)

jtiscione avatar Jun 16 '16 03:06 jtiscione

Just randomly came across this bug looking for something else. Just to clarify - the v8debug issue is related to WebStorm and has nothing to do with pg. The next patch release of WebStorm will fix that problem.

We are using pg (not directly - through loopback) with Node 6.2.1 and have no issues (with pg)

jbcpollak avatar Jun 22 '16 03:06 jbcpollak

Ah thanks for the update from both @jtiscione and @jbcpollak! Really appreciate y'all diving in on things like this that are slightly outside of the wheelhouse of the lib in general but still impact the community!

brianc avatar Jun 22 '16 03:06 brianc