Failing to install aws-sdk for using in function node


I would like to write some function node using aws-sdk in my Node-RED running as a docker container (official image nodered/node-red:2.2.2-14).

I tried both

  • npm install aws-sdk from the command line (from directory /data as user node-red) or
  • adding module aws-sdk import as AWS in the setup block of my function node

In both case I end-up with the following error log:

npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See for details.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /data/node_modules/aws-sdk
npm ERR! dest /data/node_modules/.aws-sdk.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/data/node_modules/aws-sdk' -> '/data/node_modules/.aws-sdk.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /data/.npm/_logs/2022-04-06T21_42_30_350Z-debug.log

File : 2022-04-06T21_42_30_350Z-debug.log

What am I doing wrong ?



Doesn't looks like my issue raise a lot of ideas...

One new things is that this only occurs while I'm running the docker inside an Ubuntu 20.04 in WSL2/Windows 10.

bash-5.0$ uname -a
Linux 7f9050690eae #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 Linux

I don't have the problem with the same docker image running on a true Ubuntu 20.04 machine.

bash-5.0$ uname -a
Linux 92a04dcc682a 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 Linux

Does this rings any bell to someone ?
Any hints if this could be solvable ?


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.