npm@8.19.2 ppc64: Scripts from package.json exit with ": --: not found"
When running any script declared in package.json, npm@8.19.2 (ppc64) exits without raising a STDERR message, but does not execute the script. With npm@6.14.16 on the same machine, the script is executed properly.
No matter what the script is, the message shown is <ScriptContent>: --: not found
Here's an example for a package.json resulting in this behavior:
{
"scripts": {
"npmversion": "npm -v"
}
}
Calling the script via cli
npm run npmversion
results in the following output
patrick@testas:~/example-issue-npm8$ npm run npmversion
> npmversion
> npm -v
npm -v: --: not found
That's all I get for an error message
Environment:
- npm: 8.19.2
- Node.js: v16.18.1
- OS Name: OS400 / IBM i v7r4m0
- System Model Name: IBM i
I asked for help for the same problem here about one week ago: https://github.com/npm/cli/issues/5904
Running the script with --verbose
does result in the following output
patrick@testas:~/example-issue-npm8$ npm run npmversion --verbose
npm verb cli /QOpenSys/pkgs/lib/nodejs16/bin/node /HODB/IFS/home/PATRICK/overrides/npm
npm info using npm@8.19.2
npm info using node@v16.18.1
npm timing npm:load:whichnode Completed in 1ms
npm timing config:load:defaults Completed in 3ms
npm timing config:load:file:/QOpenSys/pkgs/lib/nodejs16/lib/node_modules/npm/npmrc Completed in 2ms
npm timing config:load:builtin Completed in 2ms
npm timing config:load:cli Completed in 4ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/HODB/IFS/home/PATRICK/example-issue-npm8/.npmrc Completed in 0ms
npm timing config:load:project Completed in 2ms
npm timing config:load:file:/HODB/IFS/home/PATRICK/.npmrc Completed in 2ms
npm timing config:load:user Completed in 2ms
npm timing config:load:file:/QOpenSys/pkgs/lib/nodejs16/etc/npmrc Completed in 0ms
npm timing config:load:global Completed in 0ms
npm timing config:load:validate Completed in 2ms
npm timing config:load:credentials Completed in 1ms
npm timing config:load:setEnvs Completed in 2ms
npm timing config:load Completed in 19ms
npm timing npm:load:configload Completed in 19ms
npm timing npm:load:mkdirpcache Completed in 2ms
npm timing npm:load:mkdirplogs Completed in 0ms
npm verb title npm run npmversion
npm verb argv "run" "npmversion" "--loglevel" "verbose"
npm timing npm:load:setTitle Completed in 2ms
npm timing config:load:flatten Completed in 5ms
npm timing npm:load:display Completed in 14ms
npm verb logfile logs-max:10 dir:/HODB/IFS/home/PATRICK/.npm/_logs
npm verb logfile /HODB/IFS/home/PATRICK/.npm/_logs/2022-12-07T08_17_22_935Z-debug-0.log
npm timing npm:load:logFile Completed in 14ms
npm timing npm:load:timers Completed in 0ms
npm timing npm:load:configScope Completed in 0ms
npm timing npm:load Completed in 53ms
> npmversion
> npm -v
npm -v: --: not found
npm timing command:run Completed in 108ms
npm verb exit 127
npm timing npm Completed in 181ms
npm verb code 127
For comparison, here's the same script executed with npm@6.14.16 which is still available on our system. In this case, scripts are executed as expected.
patrick@testas:~/example-issue-npm8$ npm run npmversion --verbose
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/QOpenSys/pkgs/lib/nodejs12/bin/node',
npm verb cli '/QOpenSys/pkgs/bin/npm',
npm verb cli 'run',
npm verb cli 'npmversion',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@6.14.16
npm info using node@v12.22.11
npm verb run-script [ 'prenpmversion', 'npmversion', 'postnpmversion' ]
npm info lifecycle @开发者_Python百科~prenpmversion: @
npm info lifecycle @~npmversion: @
> @ npmversion /HODB/IFS/home/PATRICK/example-issue-npm8
> npm -v
6.14.16
npm verb lifecycle @~npmversion: unsafe-perm in lifecycle true
npm verb lifecycle @~npmversion: PATH: /QOpenSys/pkgs/lib/nodejs12/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/HODB/IFS/home/PATRICK/example-issue-npm8/node_modules/.bin:/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
npm verb lifecycle @~npmversion: CWD: /HODB/IFS/home/PATRICK/example-issue-npm8
npm info lifecycle @~postnpmversion: @
npm verb exit [ 0, true ]
npm timing npm Completed in 2255ms
npm info ok
The first time I recognized this behavior was after updating various Open Source runtime packages via yum. A lot of packages were updated, so it's hard to track down which one may cause an issue. If necessary, I will look into getting detailed information on package versions installed before and now.
Prior to the batch update, I manually pulled an update from nodejs16.ppc64 16.18.1-1 @ibmi-base
When only this package was updated, the runtime behaved as usual. About one week after the batch update, I came across this issue by chance. We plan to update from nodejs12 to nodejs16 as soon as possible, thus nodejs16 is not in regular use at the moment.
Since npm uses python, I tried using different pyhton/python2/python3
versions with supplying the --python=<PythonPackage>
parameter, with no luck.
An error with package.json was ruled out by creating a new empty directory with a stripped package.json as provided above.
Problems with my user configuration were ruled out by trying the same with another user profile. The other user profile is used in batch executions, so the user's configuration is as bland as it gets.
Whatever I tried so far, npm@8 shows the same - wrong - behavior.
This is a full statement about yum packages currently installed on our machine
patrick@testas:~/example-issue-npm8$ yum list installed
http://weitswtools.ad.holter.at/YUMRepos/openmax/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
Installed Packages
autoconf.noarch 2.69-3 @ibm/7.3
automake.noarch 1.15-3 @ibm/7.3
bash.ppc64 5.1-3 @ibmi-base
bzip2.ppc64 1.0.6-16 @ibmi-base
ca-certificates.noarch 2_git20170807.10b2785-6 @ibmi-base
ca-certificates-mozilla.noarch 2022.2.58-1 @ibmi-base
charset-alias.ppc64 1.14-6 @ibmi-base
cmake.ppc64 3.16.9-1 @ibm
coreutils-gnu.ppc64 8.25-9 @ibmi-base
coreutils-pase-dummy.ppc 7.3-1 @ibmi-base
cpio-gnu.ppc64 2.12-2 @ibmi-base
createrepo.noarch 0.10.4-4 @ibm/7.3
curl.ppc64 7.76.1-2 @ibmi-base
db.ppc64 4.8.30-3 @ibm/7.3
db2util.ppc64 1.0.12-1 @ibm
dos2unix.ppc64 7.4.1-1 @ibm/7.3
file-magic.ppc64 5.32-7 @ibmi-base
filesystem-dummy.noarch 7.3-1 @ibmi-base
findutils.ppc64 4.6.0-5 @ibmi-base
fribidi.ppc64 1.0.5-1 @openmax/7.3
gcc6-aix.fat 6.3.0-29 @ibm/7.3
gcc6-cplusplus-aix.fat 6.3.0-29 @ibm/7.3
gcc6-cpp-aix.fat 6.3.0-29 @ibm/7.3
gettext-runtime.ppc64 0.19.8-2 @ibmi-base
gettext-tools.ppc64 0.19.8-2 @ibmi-base
git.ppc64 2.26.2-3 @ibm/7.3
glib2.ppc64 2.52.0-5 @ibmi-base
gmp-aix.fat 5.1.3-14 @ibm/7.3
grep-gnu.ppc64 3.0-3 @ibmi-base
gzip.ppc64 1.8-4 @ibmi-base
ibmi-repos.noarch 7.3-3 @ibmi-release
iconv-gnu.ppc64 1.14-6 @ibmi-base
inetutils-ping.ppc64 1.9.4-0 @openmax/7.3
jq.ppc64 1.6-2 @ibm/7.3
less.ppc64 551-1 @ibm/7.3
lftp.ppc64 4.9.2-1 @ibmi-base
libICE6.ppc64 1.0.10-3 @ibm/7.3
libSM6.ppc64 1.2.3-3 @ibm/7.3
libX11-data.noarch 1.7.0-3 @ibm/7.3
libX11-xcb1.ppc64 1.7.0-3 @ibm/7.3
libXau6.ppc64 1.0.9-4 @ibm/7.3
libXdmcp6.ppc64 1.1.3-4 @ibm/7.3
libarchive13.ppc64 3.3.3-2 @ibmi-base
libatomic1.ppc64 10.3.0-11 @ibmi-base
libblas3.ppc64 3.8.0-2 @ibm/7.3
libbrotlicommon1.ppc64 1.0.9-2 @ibmi-base
libbrotlidec1.ppc64 1.0.9-2 @ibmi-base
libbz2-1.ppc64 1.0.6-16 @ibmi-base
libcurl4.ppc64 7.76.1-2 @ibmi-base
libdb48.ppc64 4.8.30-3 @ibm/7.3
libedit0.ppc64 3.1.snap20180525-0 @openmax/7.3
libexpat1.ppc64 2.2.9-2 @ibmi-base
libffi6.ppc64 3.2.1-3 @ibmi-base
libfontconfig1.ppc64 2.13.92-1 @ibm/7.3
libfreetype6.ppc64 2.10.4-1 @ibm/7.3
libgcc-aix.fat 6.3.0-29 @ibm/7.3
libgcc_s1.ppc64 10.3.0-11 @ibmi-base
libgfortran3.ppc64 6.3.0-29 @ibm/7.3
libgio-2_0-0.ppc64 2.52.0-5 @ibmi-base
libglib-2_0-0.ppc64 2.52.0-5 @ibmi-base
libgmodule-2_0-0.ppc64 2.52.0-5 @ibmi-base
libgobject-2_0-0.ppc64 2.52.0-5 @ibmi-base
libgomp1.ppc64 10.3.0-11 @ibmi-base
libiconv2.ppc64 1.14-6 @ibmi-base
libicu69.ppc64 69.1-1 @ibm/7.3
libidn2-0.ppc64 2.3.0-4 @ibmi-base
libintl9.ppc64 0.19.8-2 @ibmi-base
libjpeg8.ppc64 1.5.1-2 @ibm/7.3
libjq1.ppc64 1.6-2 @ibm/7.3
liblapack3.ppc64 3.8.0-2 @ibm/7.3
liblua5_3.ppc64 5.3.4-4 @ibmi-base
liblzma5.ppc64 5.2.3-5 @ibmi-base
liblzo2.ppc64 2.10-1 @ibm/7.3
libmagic1.ppc64 5.32-7 @ibmi-base
libmpc-aix.fat 1.0.3-15 @ibm/7.3
libncurses6.ppc64 6.0-9 @ibmi-base
libodbc2.ppc64 2.3.9-1 @ibm/7.3
libonig5.ppc64 6.9.4-1 @ibm/7.3
libopenssl1_1.ppc64 1.1.1q-1 @ibmi-base
libp11-kit0.ppc64 0.23.14-4 @ibmi-base
libpcre1.ppc64 8.45-2 @ibmi-base
libpcre2-8-0.ppc64 10.35-1 @ibm/7.3
libpng16.ppc64 1.6.37-0 @ibm/7.3
libpopt0.ppc64 1.16-3 @ibmi-base
libreadline6.ppc64 6.3-5 @ibm/7.3
libreadline8.ppc64 8.1-3 @ibmi-base
libslang2.ppc64 2.3.1a-4 @ibm/7.3
libsqlite3-0.ppc64 3.32.3-2 @ibmi-base
libssh2-1.ppc64 1.9.0-4 @ibmi-base
libstdcplusplus-aix.fat 6.3.0-29 @ibm/7.3
libstdcplusplus6.ppc64 10.3.0-11 @ibmi-base
libtasn1-6.ppc64 4.10-5 @ibmi-base
libtiff5.ppc64 4.0.9-0 @ibm/7.3
libtool.ppc64 2.4.6-5 @ibm/7.3
libutil2.ppc64 0.12.0-2 @ibmi-base
libuuid1.ppc64 2.35.1-3 @ibm/7.3
libuv1.ppc64 1.42.0-1 @ibm
libxml2-2.ppc64 2.9.4-6 @ibmi-base
libz1.ppc64 1.2.13-1 @ibmi-base
libzstd1.ppc64 1.5.2-1 @ibm
m4-gnu.ppc64 1.4.17-2 @ibmi-base
make-gnu.ppc64 4.2-3 @ibmi-base
maven.noarch 3.6.0-2 @ibm
mpfr-aix.fat 3.1.2-13 @ibm/7.3
nano.ppc64 5.3-1 @ibm/7.3
ncurses-terminfo.ppc64 6.0-9 @ibmi-base
nodejs12.ppc64 12.22.11-1 @ibm
nodejs16.ppc64 16.18.1-1 @ibmi-base
nodever.noarch 1.0.0-4 @ibm/7.3
nspr.ppc64 4.32-1 @ibm
nss.ppc64 3.68.1-1 @ibm
openssh.ppc64 8.1p1-1 @ibm
openssl-devel.ppc64 1.1.1q-1 @ibmi-base
p11-kit.ppc64 0.23.14-4 @ibmi-base
p11-kit-trust.ppc64 0.23.14-4 @ibmi-base
p7zip.ppc64 16.02-2 @ibm/7.3
pase-libs-dummy.fat 7.3-1 @ibmi-base
patch-gnu.ppc64 2.7.5-5 @ibmi-base
perl.ppc64 5.24.1-5 @ibmi-base
pkg-config.ppc64 0.29.2-2 @ibm/7.3
python2.ppc64 2.7.18-6 @ibm
python2-deltarpm.ppc64 3.6.1-3 @ibm/7.3
python2-devel.ppc64 2.7.18-6 @ibm
python2-iniparse.noarch 0.4-2 @ibm/7.3
python2-pip.noarch 9.0.1-3 @ibm/7.3
python2-pycurl.ppc64 7.43.0-4 @ibm/7.3
python2-rpm.ppc64 4.13.1-15 @ibmi-base
python2-setuptools.noarch 36.0.1-3 @ibm/7.3
python2-urlgrabber.noarch 3.10.2-3 @ibm/7.3
python2-wheel.noarch 0.29.0-3 @ibm/7.3
python3.ppc64 3.6.15-1 @ibm
python3-pip.noarch 21.1.2-1 @ibm
python3-setuptools.noarch 57.0.0-1 @ibm
python3-wheel.noarch 0.36.2-1 @ibm
rpm.ppc64 4.13.1-15 @ibmi-base
rpm-build.ppc64 4.13.1-15 @ibmi-base
rpm-devel.ppc64 4.13.1-15 @ibmi-base
rpmdevtools.noarch 8.10-2 @ibm/7.3
rsync.ppc64 3.2.3-3 @ibm
sed-gnu.ppc64 4.4-2 @ibmi-base
tar-gnu.ppc64 1.29-6 @ibmi-base
unixODBC.ppc64 2.3.9-1 @ibm/7.3
unzip.ppc64 6.0-4 @ibmi-base
update-alternatives.ppc64 1.19.7-2 @ibmi-base
vim.ppc64 8.1-3 @ibm/7.3
wget.ppc64 1.20.3-3 @ibm/7.3
yum.noarch 3.4.3-22 @ibmi-base
yum-metadata-parser.ppc64 1.1.4-3 @ibmi-base
yum-plugin-fastestmirror.noarch 1.1.31-9 @ibmi-base
yum-plugin-local.noarch 1.1.31-9 @ibmi-base
yum-utils.noarch 1.1.31-9 @ibmi-base
zip.ppc64 3.0-4 @ibmi-base
patrick@testas:~/example-issue-npm8$
精彩评论