Hello guys,
I have the following error when downloading the files from ctf.hackthebox.com and trying to build my container with docker so i can run them localy.
gear_host@1.0.0 start
node index.js
/app/database.js:1
const sqlite = require(‘sqlite-async’);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/sqlite-async/sqlite-async.js from /app/database.js not supported.
Instead change the require of sqlite-async.js in /app/database.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/app/database.js:1:16)
at Object. (/app/index.js:6:23) {
code: ‘ERR_REQUIRE_ESM’
}
2024-06-24 11:05:13,153 INFO success: node entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Node.js v20.8.1
npm notice
npm notice New minor version of npm available! 10.1.0 → 10.8.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.1
npm notice Run npm install -g npm@10.8.1
to update!
npm notice
2024-06-24 11:05:13,169 INFO exited: node (exit status 1; not expected)
2024-06-24 11:05:14,174 INFO spawned: ‘node’ with pid 24
Anyone any ideas? I have no clue. I have chaged the version to 1.1.3 from 1.1.1 but no luck .