OK I have finally figured out what the issue is with NPM on some of our LPARS and why it constantly fails is " uid must be an unsigned integer".
IBM told us it was an authority problem, but it isn't that at all. The uid in question is in fact the "User ID number" of the owner of the file that npm is doing a fs.stat() on. On the LPARS where this is a problem the user id number is huge - for example, mine is 4294770740. This must be breaking some internal limit somewhere, and gets returned as a negative number by fs.stat().
I created a test profile and specified UID(1000) and npm worked perfectly when logged on with that profile.
I will bounce this, and the V0.12.7 child process issue back to them now.
-----Original Message-----
From: Kevin Turner
Sent: 15 October 2015 16:04
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: RE: [WEB400] Node and NPM don't work properly on some LPARS?
Aha - bingo - thanks.
"npm" exists in /usr/bin and is a symbolic link to /QOpenSys/QIBM/ProdData/Node/bin/npm and that should be a symbolic link to ../lib/node_modules/npm/bin/npm-cli.js
The last link was not there - probably shafted by the copy.
Replacing the symbolic link puts us back to where we were before, with npm being unable to access the .npm cache it creates.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Aaron Bartell
Sent: 15 October 2015 15:35
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] Node and NPM don't work properly on some LPARS?
For a start, run these commands so we can see where things are pointing:
% which node | xargs ls -all
-rwxrwxr-x 1 qsys 0 26327031 Aug 6 02:13
/QOpenSys/QIBM/ProdData/Node/bin/node
% which npm | xargs ls -all
lrwxrwxr-x 1 qsys 0 76 Aug 6 02:13
/QOpenSys/QIBM/ProdData/Node/bin/npm ->
../lib/node_modules/npm/bin/npm-cli.js
In the first Node.js delivered by IBM I needed to do the following. I run node_env.sh each time I do Node work in a new shell session. I also do stuff like this in a shell file for when I start Node.js servers in "batch"
(daemon).
% cat ~/node_env.sh
export
PATH=/QOpenSys/QIBM/ProdData/Node/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
export LIBPATH=/QOpenSys/QIBM/ProdData/Node/bin
If you want to affect your current process/shell-session make sure to use a period when you invoke it:
% . node_env.sh
Aaron Bartell
litmis.com - Services for open source on IBM i
On Thu, Oct 15, 2015 at 9:25 AM, Kevin Turner <kevin.turner@xxxxxxxxxxxxxxx>
wrote:
In spinning back to node v0.10.35, npm is now completely shafted:
module.js:340
throw err;
^
Error: Cannot find module 'npmlog'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /QOpenSys/QIBM/ProdData/Node/bin/npm:19:11
at Object.<anonymous> (/QOpenSys/QIBM/ProdData/Node/bin/npm:87:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
Any ideas? Looks like we have shafted a symbolic link somewhere perhaps.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
As an Amazon Associate we earn from qualifying purchases.