Closed P6g9YHK6 closed 1 month ago
Hi
You miss some dependencies. This tool is built to run on Debian or apt compatible os.
Install node and npm and it will work
i did but ended up having too much issues you maybe need to do a docker image to avoid having this dependency cluster fuck repeating in other places
./install.sh: line 14: command_exists: command not found
Node.js is already installed.
mkdir: cannot create directory ‘nmap-viewer’: File exists
Cloning the Nmap Viewer repository...
fatal: destination path '.' already exists and is not an empty directory.
Installing dependencies...
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@csstools/postcss-trigonometric-functions@1.0.2',
npm WARN EBADENGINE required: { node: '^14 || >=16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@csstools/selector-specificity@2.2.0',
npm WARN EBADENGINE required: { node: '^14 || ^16 || >=18' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@jest/expect-utils@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-get-type@29.6.3',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@testing-library/dom@10.4.0',
npm WARN EBADENGINE required: { node: '>=18' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@jest/schemas@29.6.3',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@jest/types@29.6.3',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'diff-sequences@29.6.3',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'expect@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-diff@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-get-type@29.6.3',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-matcher-utils@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-message-util@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'jest-util@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'pretty-format@29.7.0',
npm WARN EBADENGINE required: { node: '^14.15.0 || ^16.10.0 || >=18.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'eslint-config-react-app@7.0.1',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'foreground-child@3.3.0',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'signal-exit@4.1.0',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'minipass@7.1.2',
npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'path-scurry@1.11.1',
npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.18' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'postcss-import@15.1.0',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'postcss-load-config@4.0.2',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'lilconfig@3.1.2',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'yaml@2.5.1',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'react-app-polyfill@3.0.0',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'react-dev-utils@12.0.1',
npm WARN EBADENGINE required: { node: '>=14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'react-scripts@5.0.1',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'sucrase@3.35.0',
npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'minimatch@9.0.5',
npm WARN EBADENGINE required: { node: '>=16 || 14 >=14.17' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'tailwindcss@3.4.13',
npm WARN EBADENGINE required: { node: '>=14.0.0' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
up to date, audited 1589 packages in 6s
265 packages are looking for funding
run `npm fund` for details
8 vulnerabilities (2 moderate, 6 high)
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
Building the project...
> nmap-viewer@0.1.0 build
> react-scripts build
internal/modules/cjs/loader.js:818
throw err;
^
Error: Cannot find module './IsArray'
Require stack:
- /opt/tacticalmesh/nmap-viewer/node_modules/es-abstract/2024/Call.js
- /opt/tacticalmesh/nmap-viewer/node_modules/string.prototype.matchall/implementation.js
- /opt/tacticalmesh/nmap-viewer/node_modules/string.prototype.matchall/index.js
- /opt/tacticalmesh/nmap-viewer/node_modules/@surma/rollup-plugin-off-main-thread/index.js
- /opt/tacticalmesh/nmap-viewer/node_modules/workbox-build/build/lib/bundle.js
- /opt/tacticalmesh/nmap-viewer/node_modules/workbox-webpack-plugin/build/generate-sw.js
- /opt/tacticalmesh/nmap-viewer/node_modules/workbox-webpack-plugin/build/index.js
- /opt/tacticalmesh/nmap-viewer/node_modules/react-scripts/config/webpack.config.js
- /opt/tacticalmesh/nmap-viewer/node_modules/react-scripts/scripts/build.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/opt/tacticalmesh/nmap-viewer/node_modules/es-abstract/2024/Call.js:8:15)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/tacticalmesh/nmap-viewer/node_modules/es-abstract/2024/Call.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/string.prototype.matchall/implementation.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/string.prototype.matchall/index.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/@surma/rollup-plugin-off-main-thread/index.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/workbox-build/build/lib/bundle.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/workbox-webpack-plugin/build/generate-sw.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/workbox-webpack-plugin/build/index.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/react-scripts/config/webpack.config.js',
'/opt/tacticalmesh/nmap-viewer/node_modules/react-scripts/scripts/build.js'
]
}
npm ERR! code 1
npm ERR! path /opt/tacticalmesh/nmap-viewer
npm ERR! command failed
npm ERR! command sh -c react-scripts build
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-10-02T14_39_26_963Z-debug.log
Installing serve...
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'serve@14.2.3',
npm WARN EBADENGINE required: { node: '>= 14' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'boxen@7.0.0',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: 'camelcase@7.0.1',
npm WARN EBADENGINE required: { node: '>=14.16' },
npm WARN EBADENGINE current: { node: 'v12.22.12', npm: '7.5.2' }
npm WARN EBADENGINE }
changed 90 packages, and audited 91 packages in 8s
24 packages are looking for funding
run `npm fund` for details
3 high severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
Starting the application...
file:///usr/local/lib/node_modules/serve/build/main.js:169
const ipAddress = request.socket.remoteAddress?.replace("::ffff:", "") ?? "unknown";
^
SyntaxError: Unexpected token '.'
at Loader.moduleStrategy (internal/modules/esm/translators.js:133:18)
at async link (internal/modules/esm/module_job.js:42:21)
Opening Nmap Viewer in your default browser...
w3m: Can't load http://localhost:3001.
/usr/bin/xdg-open: 882: links2: not found
/usr/bin/xdg-open: 882: elinks: not found
/usr/bin/xdg-open: 882: links: not found
/usr/bin/xdg-open: 882: lynx: not found
w3m: Can't load http://localhost:3001.
xdg-open: no method available for opening 'http://localhost:3001'
w3m: Can't load http://localhost:3001.
/usr/bin/open: 882: links2: not found
/usr/bin/open: 882: elinks: not found
/usr/bin/open: 882: links: not found
/usr/bin/open: 882: lynx: not found
w3m: Can't load http://localhost:3001.
xdg-open: no method available for opening 'http://localhost:3001'
./install.sh: line 69: start: command not found
Installation complete! Nmap Viewer is now running on http://localhost:3001
To stop the application, use 'pkill node' or close this terminal window.
i did but ended up having too much issues you maybe need to do a docker image to avoid having this dependency cluster fuck repeating in other places
You're right for the docker, but for the moment I don't have time to do this. Maybe later
You didn't told me what OS you use, because command_exists return an error.
You can simply use adsf to run node https://github.com/asdf-vm/asdf
Just install ASDF and launch install script.
You use an old nodejs version (12) which is deprecated since more than 2 years. https://blog.logrocket.com/manage-node-js-versions-using-asdf/#installing-node-js-plugin
This way you could keep your old version of nodejs, and use the latest to run nmap-viewer
@P6g9YHK6 Works for you now ?
going to have a look myself but i tought you should know