|
Question: but Ibm can't help us ?
Hi Aaron
here what i have done
"
$ npm install node-repl
nodejs-demo@1.0.0 /home/mm/nodedbg
`-- node-repl@2.0.2
`-- strip-bom@1.0.0
+-- first-chunk-stream@1.0.0
`-- is-utf8@0.2.1"
run this (first)
$ node_modules/node-repl/bin/node-repl indes.js
node_modules/node-repl/bin/node-repl: not found
run this (then)
$ node-repl index
node-repl: not found
thanks anyway
Question: but Ibm can't help us ?
________________________________
Da: OpenSource <opensource-bounces@xxxxxxxxxxxx> per conto di Aaron
Bartell <aaronbartell@xxxxxxxxx>
Inviato: mercoledì 26 luglio 2017 18:04:29
A: IBMi Open Source Roundtable
Oggetto: Re: [IBMiOSS] How to debug NodeJs ?
i have tried to install REPL (npm install node-repl -g) but when i run"node-repl server.js" i receive "node-repl: not found" ??
Try installing the node-repl npm local to your project (omit -g during
install) and then run it like so...
$ node_modules/node-repl/bin/node-repl mypgm.js
Note I haven't tested the above, just showing how to resolve to where the
runtime for node-repl most likely exists.
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
On Wed, Jul 26, 2017 at 10:55 AM, john art <jhon_art@xxxxxxxxxxx> wrote:
Hi and thanks alloptions ?
I am discouraged ..
with inspector i can't debug my source, with VS neither,, i have tried to
install REPL (npm install node-repl -g) but when i run "node-repl
server.js" i receive "node-repl: not found" ?? i have exhausted all<
http://context.reverso.net/traduzione/inglese-
italiano/they+have+exhausted+all> options ..
pheraps ibm released PTF for inspector problem or are there other
on
Thanks in advance
________________________________
Da: OpenSource <opensource-bounces@xxxxxxxxxxxx> per conto di Aaron
Bartell <aaronbartell@xxxxxxxxx>
Inviato: mercoledì 26 luglio 2017 17:33
A: IBMi Open Source Roundtable
Oggetto: Re: [IBMiOSS] How to debug NodeJs ?
Hi Kevin,
I wanted to clarify something...
VS Code is running your app locally on your PC, so it can't load stuffthat resides in your IBMi IFS.
What's important to note/contrast is VSCode is using the Node.js runtime
your local PC and ~not~ the IBM i Node.js runtime. Further, this meansyou
~can~ load the source from the IFS via mapped drive**, but it will be runpath
in the local PC's Node.js runtime. In John's case it couldn't resolve
/QOpenSys... which can be fixed. What ~can't~ be fixed is that theNode.js
DB2 adapter/driver is a native extension (compiled for PASE SQL CLIs onIBM
i). So even after resolving the path, it still most likely won't work.some
The next question might be "What if I run Node.js v6.9.1 on both my local
PC and IBM i and don't use the native IBM i Node.js DB2 adapter/driver,
will I still have issues?" The answer is "it depends". For example,
npms call out to OS file system commands/APIs (i.e futime) and not all ofwhile
those exist on IBM i. This means that it could work on your local PC
in development but fail once deployed to production on IBM i. It's worthNode.js
nothing that some npms are only required during development so this isn't
an issue (i.e. devDependencies in package.json). The short answer is you
should also use the production Node.js runtime for your development
runtime to save from surprises. What I do is use the VSCode debugger inmove
small scenarios where I need to figure out what is going on and then I
back to using the IBM i Node.js runtime for development once the issuehas
been resolved.option
** I use SSHFS. Learn more here: http://krengel.tech/mcpress-
edit-ifs-files
I hope what I said makes sense.
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
On Wed, Jul 26, 2017 at 10:07 AM, Kevin Turner <
kevin.turner@xxxxxxxxxxxxxx>
wrote:
You missed the bit earlier in the email trail that said that this
becauseis only possible if your code is platform agnostic. Yours is not
IFS.it is trying to load IBMi code from the IFS. VS Code is running yourapp
locally on your PC, so it can't load stuff that resides in your IBMi
VSYou would need to have copies of this stuff within your project andart [
load/require it from there.
________________________________________
From: OpenSource [opensource-bounces@xxxxxxxxxxxx] on behalf of john
jhon_art@xxxxxxxxxxx]
Sent: 26 July 2017 15:47
To: IBMi Open Source Roundtable
Subject: Re: [IBMiOSS] How to debug NodeJs ?
[External Email]
________________________________
Hi Kevin
ok now is better ..
but when i try to debug a very simple js file i receive this error (in
angelo\nodewebix\server.js:5:10<file:Code debug view)Node6/os400/db2i/lib/db2a'
Error: Cannot find module '/QOpenSys/QIBM/ProdData/OPS/
at Function.Module._resolveFilename (module.js:469:15) at
Function.Module._load (module.js:417:25) at Module.require
(module.js:497:17) at require (internal/module.js:20:19) at
Object.<anonymous> (<file://>\\192.168.50.8\
//\\192.168.50.8\angelo\nodewebix\server.js:5:10>) at-
Module._compile (module.js:570:32) at Object.Module._extensions..js
(module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad
(module.js:446:12) at Function.Module._load (module.js:438:3)
i checked and in my As400 this file exist ..
where am i wrong and why in normal run i don't receive thsi error
thanks
________________________________
Da: OpenSource <opensource-bounces@xxxxxxxxxxxx> per conto di Kevin
Turner <kevin.turner@xxxxxxxxxxxxxx>
Inviato: mercoledì 26 luglio 2017 11:26:51
A: IBMi Open Source Roundtable
Oggetto: Re: [IBMiOSS] How to debug NodeJs ?
Make sure you are using VS Code (not VS). The two are completely
different.
When you are using the debug option you are running the code within VS
;it prompts you to create a profile to describe how it should launch theart [
application (i.e. which module to run). You don't need a browser for
debugging. You only need that if your application is a browser-based
application, so you would use the browser to interact with your app.
You'd be much better off following a VS Code debugging tutorial than
asking on here.
________________________________________
From: OpenSource [opensource-bounces@xxxxxxxxxxxx] on behalf of john
jhon_art@xxxxxxxxxxx]
Sent: 26 July 2017 10:19
To: IBMi Open Source Roundtable
Subject: Re: [IBMiOSS] How to debug NodeJs ?
[External Email]
________________________________
Hi
sorry but I have some difficulties to understand how VS debugger works
May
- i open the source in VS
- start debug in VS
- then i have to start the app with node ($ node index) ?
- then i have to open in browser my ?
sorry but don't undesrtand how to use/run it ..
can some one help me suggesting sone stesp by step link
Thanks in advance
________________________________
Da: OpenSource <opensource-bounces@xxxxxxxxxxxx> per conto di Brian
<http://www.profoundlogic.com<http://www.profoundlogic.com<http://<>
bmay@xxxxxxxxxxxxxxxxx>
Inviato: giovedì 20 luglio 2017 17:49:36
A: IBMi Open Source Roundtable
Oggetto: Re: [IBMiOSS] How to debug NodeJs ?
We also use VS Code for debugging. It is a very easy debugging
environment.
Brian May
Director
Pre-Sales and Customer Solutions
Profound Logic Software
http://www.profoundlogic.com
937-439-7925 Phone
877-224-7768 Toll Free
The IBM i Modernization Experts
www.profoundlogic.com<http://www.profoundlogic.com<http://<<
http://www.profoundlogic.com<http://www.profoundlogic.com<http://>http://www.profoundlogic.com<http://www.profoundlogic.com<http://>
www.profoundlogic.com<http://www.profoundlogic.com<http://<
www.profoundlogic.com<http://www.profoundlogic.com<http://www.profoundlogic.com<http://www.profoundlogic.com>>>>
logs
Profound.js: Agile, Connected, Secure
Bring the benefits of Node.js and Agile Modernization to your IBM i
Enterprise
Click here to learn more
-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of
Kevin Turner
Sent: Thursday, July 20, 2017 10:42 AM
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxx>
Subject: Re: [IBMiOSS] How to debug NodeJs ?
I use VS code for debugging because our stuff is generally platform
agnostic. We also use winston for logging - so you can output debug
Onwhen running in debug mode that don't clutter logs in prod mode.
[https://www.netcracker.com/assets/img/netcracker-social-final.png] ƕ
I20 Jul 2017, at 16:34, Aaron Bartell <aaronbartell@xxxxxxxxx> wrote:
[External Email]
________________________________
Hi John,
Debugging Node.js can be done in a variety of fashions. Here's what
takecurrently do...wrote:
- REPL. The Node.js REPL is great for quickly testing smaller chunks
of code in PASE. I use this frequently to test my iterations of
formulating the correct parm lists for calling RPG programs.
- console.log(). Not ideal, but it works.
- If the code is platform agnostic then you can use the VSCode step
debugger (note this will eventually work for Node.js in PASE once IBM
addresses the node-inspector issue).
- Certain web frameworks have debug output capabilities while in
development mode. For example, ExpressJs debugging
<https://expressjs.com/en/guide/debugging.html>.
Aaron Bartell
IBM i hosting, starting at $157/month. litmis.com/spaces
On Wed, Jul 19, 2017 at 12:35 PM, john art <jhon_art@xxxxxxxxxxx>
if node-inspecto don't work (if i wel understand) , how can i debug
nodeJs ?
Thanks in advance
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please
takea moment to review the archives at--
http://archive.midrange.com/opensource.
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please
proprietarya moment to review the archives at
http://archive.midrange.com/opensource.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential,
orand/or privileged material. Any review, retransmission, dissemination
informationother use of, or taking of any action in reliance upon, this
bymaterial
persons or entities other than the intended recipient is prohibited. Ifyou
received this in error, please contact the sender and delete the
postfrom any computer.
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To
aa message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take
opensource.moment to review the archives at http://archive.midrange.com/
proprietary--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential,
orand/or privileged material. Any review, retransmission, dissemination
informationother use of, or taking of any action in reliance upon, this
bymaterial
persons or entities other than the intended recipient is prohibited. Ifyou
received this in error, please contact the sender and delete the
proprietaryfrom any computer.
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
________________________________
The information transmitted herein is intended only for the person or
entity to which it is addressed and may contain confidential,
orand/or privileged material. Any review, retransmission, dissemination
informationother use of, or taking of any action in reliance upon, this
bymaterial
persons or entities other than the intended recipient is prohibited. Ifyou
received this in error, please contact the sender and delete the
--from any computer.--
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
--
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: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.