Error "not found: make" despite having installed make on AXC2152

I have AXC2152. I installed Node.js from the plcnext store, node-red , then wanted to install OPC UA IIoT node on node-red but knew about the problem of compiling the package in native. So I followed Bjorn article about installing GNU Guix package manager but relied mainly on the script which did all steps. However, the environment variables have to be set everytime I login as “root”. I installed make, python, and GCC and suffered till I was able to use python 2.7 in npm command. Now when I try running command “npm install -g bcrypt”, there is error that it can’t find make despite I can run make from command line. I am not that knowledgeable in linux and ofcourse new to PLCnext so appreciate your help

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v64-linux-arm-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt@3.0.6 and node@10.15.3 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
gyp WARN EACCES user “root” does not have permission to access the dev dir “/home/root/.node-gyp/10.15.3”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/opt/plcnext/appshome/data/60002172000051/lib/node_modules/bcrypt/.node-gyp”
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/which/which.js:13:12)
gyp ERR! stack at F (/opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/which/which.js:68:19)
gyp ERR! stack at E (/opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:153:21)
gyp ERR! System Linux 4.14.63-rt40-pxc
gyp ERR! command “/opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/bin/node” “/opt/plcnext/apps/60002172000051/opt/node-v10.15.3-linux-armv7l/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/opt/plcnext/appshome/data/60002172000051/lib/node_modules/bcrypt/lib/binding/bcrypt_lib.node” “–module_name=bcrypt_lib” “–module_path=/opt/plcnext/appshome/data/60002172000051/lib/node_modules/bcrypt/lib/binding” “–napi_version=3” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v64”
gyp ERR! cwd /opt/plcnext/appshome/data/60002172000051/lib/node_modules/bcrypt
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error

GSDML-V2.33-PhoenixContact-GWPNASCII-20171001 - EDIT (2).zip

Hello Smoharam, this seems like a only node related issue you might get better support from the Supplier of the Software you are using.

Still: What does “which make” result? Is make available at the PATH? kind regards,
Oliver.

Thank you Oliver! I will work on the AXC2152 afternoon. Will check environment variable $PATH and “which make” and update you. I hope it would be basic problem and get solved. Best Regards Sherif Moharam

Hi Oliver, Everytime I use putty from Winscp to login with admin and then switch to root, and I set all environment variables before running any npm command or starting node-red. When I try which make it shows the folder /home/root/.guix-profile/bin/make Also I can run command make. So there is no issue make I guess. If I installed Node.js from the store direct to the plc then under which user it is being installed? I doubt that Node.js has problem with root user and might not see all changes I made. Because I had similar issue with Python. “which python” returns the correct folder location of version 2.7 and “python --version” returns 2.7 version but the npm kept on working with python /user/bin so I had to delete the hard link between python file under /user/bin and recreate the file to link it to the python 2.7 location. All these issues I didn’t face when I used node.js and node red on Raspberry Pi because they didn’t have the restriction of this Node.js version on the PLC store. Now we had to make workarounds to be able to install additional packages on node js.