smicallef / spiderfoot

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
http://www.spiderfoot.net
MIT License
13.27k stars 2.29k forks source link

npm not found: Failed to build docker-compose full #1825

Open AlistairLR112 opened 12 months ago

AlistairLR112 commented 12 months ago

Please provide a description of the issue and any relevant error messages. Full version of docker-compose build fails due to npm error

Docker version 24.0.6, build ed223bc - using colima

  System Version: macOS 14.1.1 (23B81)
  Kernel Version: Darwin 23.1.0
  Boot Volume: Macintosh HD
  Model Name: MacBook Pro
  Model Identifier: MacBookPro17,1
  Chip: Apple M1
  Total Number of Cores: 8 (4 performance and 4 efficiency)
  Memory: 16 GB
  System Firmware Version: 10151.41.12
  OS Loader Version: 10151.41.12

If you can provide an application stack trace that is even better.


0.104 
0.104 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.104 
0.106 Reading package lists...
0.384 Building dependency tree...
0.457 Reading state information...
0.551 Package 'cmdtest' is not installed, so not removed
0.551 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
0.553 
0.553 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.553 
0.554 Reading package lists...
0.832 Building dependency tree...
0.906 Reading state information...
0.996 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1.024 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
1.410 OK
1.415 deb https://dl.yarnpkg.com/debian/ stable main
1.479 Hit:1 http://deb.debian.org/debian bookworm InRelease
1.487 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
1.501 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
1.517 Get:4 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
1.844 Get:5 https://dl.yarnpkg.com/debian stable/main arm64 Packages [10.9 kB]
1.899 Get:6 https://dl.yarnpkg.com/debian stable/main all Packages [10.9 kB]
1.915 Fetched 38.9 kB in 0s (80.1 kB/s)
1.915 Reading package lists...
2.223 W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
2.227 Reading package lists...
2.504 Building dependency tree...
2.576 Reading state information...
2.658 The following additional packages will be installed:
2.658   libc-ares2 libnode108 libuv1 node-acorn node-busboy node-cjs-module-lexer
2.658   node-undici node-xtend nodejs nodejs-doc
2.658 Suggested packages:
2.658   npm
2.698 The following NEW packages will be installed:
2.698   libc-ares2 libnode108 libuv1 node-acorn node-busboy node-cjs-module-lexer
2.698   node-undici node-xtend nodejs nodejs-doc yarn
2.748 0 upgraded, 11 newly installed, 0 to remove and 4 not upgraded.
2.748 Need to get 14.6 MB of archives.
2.748 After this operation, 70.1 MB of additional disk space will be used.
2.748 Get:1 http://deb.debian.org/debian bookworm/main arm64 libc-ares2 arm64 1.18.1-3 [99.2 kB]
2.783 Get:2 http://deb.debian.org/debian bookworm/main arm64 libuv1 arm64 1.44.2-1 [133 kB]
2.802 Get:3 http://deb.debian.org/debian bookworm/main arm64 node-xtend all 4.0.2-3 [3932 B]
2.805 Get:4 http://deb.debian.org/debian bookworm/main arm64 nodejs arm64 18.13.0+dfsg1-1 [304 kB]
2.816 Get:5 https://dl.yarnpkg.com/debian stable/main arm64 yarn all 1.22.19-1 [893 kB]
2.861 Get:6 http://deb.debian.org/debian bookworm/main arm64 node-acorn all 8.8.1+ds+~cs25.17.7-2 [128 kB]
2.864 Get:7 http://deb.debian.org/debian bookworm/main arm64 node-cjs-module-lexer all 1.2.2+dfsg-5 [30.1 kB]
2.869 Get:8 http://deb.debian.org/debian bookworm/main arm64 node-busboy all 1.6.0+~cs2.6.0-2 [16.9 kB]
2.871 Get:9 http://deb.debian.org/debian bookworm/main arm64 node-undici all 5.15.0+dfsg1+~cs20.10.9.3-1+deb12u1 [284 kB]
2.933 Get:10 http://deb.debian.org/debian bookworm/main arm64 libnode108 arm64 18.13.0+dfsg1-1 [9366 kB]
4.641 Get:11 http://deb.debian.org/debian bookworm/main arm64 nodejs-doc all 18.13.0+dfsg1-1 [3358 kB]
5.232 debconf: delaying package configuration, since apt-utils is not installed
5.248 Fetched 14.6 MB in 2s (6108 kB/s)
5.259 Selecting previously unselected package libc-ares2:arm64.
(Reading database ... 55489 files and directories currently installed.)
5.274 Preparing to unpack .../00-libc-ares2_1.18.1-3_arm64.deb ...
5.276 Unpacking libc-ares2:arm64 (1.18.1-3) ...
5.292 Selecting previously unselected package libuv1:arm64.
5.295 Preparing to unpack .../01-libuv1_1.44.2-1_arm64.deb ...
5.296 Unpacking libuv1:arm64 (1.44.2-1) ...
5.313 Selecting previously unselected package node-xtend.
5.315 Preparing to unpack .../02-node-xtend_4.0.2-3_all.deb ...
5.316 Unpacking node-xtend (4.0.2-3) ...
5.327 Selecting previously unselected package nodejs.
5.330 Preparing to unpack .../03-nodejs_18.13.0+dfsg1-1_arm64.deb ...
5.331 Unpacking nodejs (18.13.0+dfsg1-1) ...
5.367 Selecting previously unselected package node-acorn.
5.370 Preparing to unpack .../04-node-acorn_8.8.1+ds+~cs25.17.7-2_all.deb ...
5.371 Unpacking node-acorn (8.8.1+ds+~cs25.17.7-2) ...
5.394 Selecting previously unselected package node-cjs-module-lexer.
5.397 Preparing to unpack .../05-node-cjs-module-lexer_1.2.2+dfsg-5_all.deb ...
5.398 Unpacking node-cjs-module-lexer (1.2.2+dfsg-5) ...
5.409 Selecting previously unselected package node-busboy.
5.412 Preparing to unpack .../06-node-busboy_1.6.0+~cs2.6.0-2_all.deb ...
5.413 Unpacking node-busboy (1.6.0+~cs2.6.0-2) ...
5.424 Selecting previously unselected package node-undici.
5.427 Preparing to unpack .../07-node-undici_5.15.0+dfsg1+~cs20.10.9.3-1+deb12u1_all.deb ...
5.428 Unpacking node-undici (5.15.0+dfsg1+~cs20.10.9.3-1+deb12u1) ...
5.456 Selecting previously unselected package libnode108:arm64.
5.459 Preparing to unpack .../08-libnode108_18.13.0+dfsg1-1_arm64.deb ...
5.460 Unpacking libnode108:arm64 (18.13.0+dfsg1-1) ...
5.811 Selecting previously unselected package nodejs-doc.
5.814 Preparing to unpack .../09-nodejs-doc_18.13.0+dfsg1-1_all.deb ...
5.815 Unpacking nodejs-doc (18.13.0+dfsg1-1) ...
5.959 Selecting previously unselected package yarn.
5.962 Preparing to unpack .../10-yarn_1.22.19-1_all.deb ...
5.963 Unpacking yarn (1.22.19-1) ...
6.027 Setting up node-cjs-module-lexer (1.2.2+dfsg-5) ...
6.030 Setting up libc-ares2:arm64 (1.18.1-3) ...
6.032 Setting up libuv1:arm64 (1.44.2-1) ...
6.034 Setting up nodejs-doc (18.13.0+dfsg1-1) ...
6.037 Setting up yarn (1.22.19-1) ...
6.039 Setting up node-xtend (4.0.2-3) ...
6.041 Setting up node-busboy (1.6.0+~cs2.6.0-2) ...
6.044 Setting up node-undici (5.15.0+dfsg1+~cs20.10.9.3-1+deb12u1) ...
6.047 Setting up node-acorn (8.8.1+ds+~cs25.17.7-2) ...
6.049 Setting up libnode108:arm64 (18.13.0+dfsg1-1) ...
6.051 Setting up nodejs (18.13.0+dfsg1-1) ...
6.055 update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
6.056 Processing triggers for libc-bin (2.36-9+deb12u3) ...
6.270 yarn install v1.22.19
6.280 info No lockfile found.
6.283 [1/4] Resolving packages...
6.283 [2/4] Fetching packages...
6.284 [3/4] Linking dependencies...
6.287 [4/4] Building fresh packages...
6.289 success Saved lockfile.
6.290 Done in 0.02s.
6.523 
6.523 ================================================================================
6.523 ================================================================================
6.523 
6.523                               DEPRECATION WARNING                            
6.523 
6.523   Node.js 17.x is no longer actively supported!
6.523 
6.523   You will not receive security or critical stability updates for this version.
6.523 
6.523   You should migrate to a supported version of Node.js as soon as possible.
6.523   Use the installation script that corresponds to the version of Node.js you
6.523   wish to install. e.g.
6.523 
6.523    * https://deb.nodesource.com/setup_16.x — Node.js 16 "Gallium"
6.523    * https://deb.nodesource.com/setup_18.x — Node.js 18 LTS "Hydrogen" (recommended)
6.523    * https://deb.nodesource.com/setup_19.x — Node.js 19 "Nineteen"
6.523    * https://deb.nodesource.com/setup_20.x — Node.js 20 "Iron" (current)
6.523 
6.523   Please see https://github.com/nodejs/Release for details about which
6.523   version may be appropriate for you.
6.523 
6.523   The NodeSource Node.js distributions repository contains
6.523   information both about supported versions of Node.js and supported Linux
6.523   distributions. To learn more about usage, see the repository:
6.523     https://github.com/nodesource/distributions
6.524 
6.524 ================================================================================
6.524 ================================================================================
6.524 
6.524 Continuing in 20 seconds ...
6.524 
26.53 
26.53 ================================================================================
26.53 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
26.53 ================================================================================
26.53 
26.53                            SCRIPT DEPRECATION WARNING                    
26.53 
26.53   
26.53   This script, located at https://deb.nodesource.com/setup_X, used to
26.53   install Node.js is deprecated now and will eventually be made inactive.
26.53 
26.53   Please visit the NodeSource distributions Github and follow the
26.53   instructions to migrate your repo.
26.53   https://github.com/nodesource/distributions
26.53 
26.53   The NodeSource Node.js Linux distributions GitHub repository contains
26.53   information about which versions of Node.js and which Linux distributions
26.53   are supported and how to install it.
26.53   https://github.com/nodesource/distributions
26.53 
26.53 
26.53                           SCRIPT DEPRECATION WARNING
26.53 
26.53 ================================================================================
26.53 ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
26.53 ================================================================================
26.53 
26.53 TO AVOID THIS WAIT MIGRATE THE SCRIPT
26.53 Continuing in 60 seconds (press Ctrl-C to abort) ...
26.53 
86.54 
86.54 ## Installing the NodeSource Node.js 17.x repo...
86.54 
86.54 
86.54 ## Populating apt-get cache...
86.54 
86.54 + apt-get update
86.64 Hit:1 http://deb.debian.org/debian bookworm InRelease
86.65 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
86.66 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
86.68 Hit:4 https://dl.yarnpkg.com/debian stable InRelease
86.81 Reading package lists...
87.09 W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
87.09 
87.09 ## Installing packages required for setup: lsb-release...
87.09 
87.09 + apt-get install -y lsb-release > /dev/null 2>&1
87.77 
87.77 ## Confirming "bookworm" is supported...
87.77 
87.77 + curl -sLf -o /dev/null 'https://deb.nodesource.com/node_17.x/dists/bookworm/Release'
88.05 
88.05 ## Adding the NodeSource signing key to your keyring...
88.05 
88.05 + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
88.19 
88.19 ## Creating apt sources list file for the NodeSource Node.js 17.x repo...
88.19 
88.19 + echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_17.x bookworm main' > /etc/apt/sources.list.d/nodesource.list
88.19 + echo 'deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_17.x bookworm main' >> /etc/apt/sources.list.d/nodesource.list
88.19 
88.19 ## Running `apt-get update` for you...
88.19 
88.19 + apt-get update
88.26 Hit:1 http://deb.debian.org/debian bookworm InRelease
88.27 Hit:2 http://deb.debian.org/debian bookworm-updates InRelease
88.29 Hit:3 http://deb.debian.org/debian-security bookworm-security InRelease
88.30 Get:4 https://deb.nodesource.com/node_17.x bookworm InRelease [4586 B]
88.32 Hit:5 https://dl.yarnpkg.com/debian stable InRelease
88.42 Get:6 https://deb.nodesource.com/node_17.x bookworm/main arm64 Packages [774 B]
88.45 Fetched 5360 B in 0s (22.8 kB/s)
88.45 Reading package lists...
88.73 W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
88.73 
88.73 ## Run `sudo apt-get install -y nodejs` to install Node.js 17.x and npm
88.73 ## You may also need development tools to build native addons:
88.73      sudo apt-get install gcc g++ make
88.73 ## To install the Yarn package manager, run:
88.73      curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/null
88.73      echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
88.73      sudo apt-get update && sudo apt-get install yarn
88.73 
88.73 
88.73 Reading package lists...
89.01 Building dependency tree...
89.08 Reading state information...
89.17 nodejs is already the newest version (18.13.0+dfsg1-1).
89.17 nodejs set to manually installed.
89.17 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
89.18 /bin/sh: 1: npm: not found
------
failed to solve: process "/bin/sh -c apt remove -y cmdtest     && apt remove -y yarn     && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -     && echo 'deb https://dl.yarnpkg.com/debian/ stable main' |tee /etc/apt/sources.list.d/yarn.list     && apt-get update     && apt-get install yarn -y     && yarn install     && curl -fsSL https://deb.nodesource.com/setup_17.x | bash -     && apt-get install -y nodejs     && npm install -g retire" did not complete successfully: exit code: 127```

**What version of Docker are you using?**
Docker version 24.0.6, build ed223bc

**What version of SpiderFoot are you using (stable release or Git `master` branch)?**
git master branch as of 04/12/2023
WildCard1 commented 9 months ago

I got exactly the same error

EDIT: adding npm to the end of line 12 seems to have fixed it, so it reads RUN apt-get -y update && apt-get -y install nbtscan onesixtyone nmap npm.

I also moved the block related to #Install RetireJS to line 13, so I didn't have to wait that long when testing if it worked, but I don't think that really mattered.