× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.

Sounds to me like you are using a node V6 sample/example but you have not
got node 6 installed. You are probably using an older version. Try "node
-v" from a shell command line to check. Arrow functions have been valid
for a while so you must be on a really old version.

-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of
Smith, Mike
Sent: 19 December 2017 20:05
To: opensource@xxxxxxxxxxxx
Subject: [IBMiOSS] beginning node.js

I'm trying to play a bit with Node.js when I have some spare time.
I'm currently trying to work my way through the tutorial at

I have made it up to the point where I try to connect to DB2.

So a couple of quick basic questions that I worked around, but wondered if
someone could clarify.

On the statement
Var webserver = http.createServer((req,res) I cannot get it to work unless I
change it to Var webserver = http.createServer(function(req,res).

Anyone know why?

Secondly the sample uses => in several sections of the code.
I cannot get it to work unless I remove these.

Now on to the db2 piece.
I've tried keying and copying/pasting removing the => and adding the
function But I keep getting invalid tokens on the { after the fs.exists

So I tried to run step my way through it a piece at a time, but it doesn't
seem to like the db = require('/QOpenSys...... line
var db =
Error: Symbol resolution failed for
/QOpenSys/QIBM/ProdData/OPS/Node6/os400/db2i/bin/db2ia.node because:
_ZN2v816FunctionTemplate12SetClassNameENS_5LocalINS_6StringEEE (number 74)
is not exported from dependent
module node.
5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEi (number 77) is not exported
from dependent
module node.
_16WeakCallbackTypeE (number 80) is not exported from dependent
module node.
Symbol _ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_ (number 89) is
not exported from dependent
module node.
Symbol _ZN2v86Object3SetEjNS_5LocalINS_5ValueEEE (number 90) is not
exported from dependent
module node.
Symbol _ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE (number 92)
is not exported from dependent
module node.

Can someone help me sort this out?
Also, if anyone has any working examples, they wouldn't mind sharing, that
would be greatly appreciated.


NOTICE: This message, including any attachment, is intended as a
confidential and privileged communication. If you have received this message
in error, or are not the named recipient(s), please immediately notify the
sender and delete this message.
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a
message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at https://archive.midrange.com/opensource.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.