I am following the steps provided in the CTF_SUG.pdf documentation. I am able to activate my CTF environment by following the steps with seemingly nominal log output. However, once I arrive at the step to run the editor, the script to run the editor fails. It would be greatly appreciated to get any type of insight on what might be going wrong and if it the error indicates something I did incorrectly during setup.
./run_editor.sh
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN ctf-ui@1.0.0 No repository field.
npm WARN ctf-ui@1.0.0 No license field.
> ctf-ui@1.0.0 start /home/daniel/ctf/tools/ctf_ui
> npm run build:prod && npm run start:prod
> ctf-ui@1.0.0 build:prod /home/daniel/ctf/tools/ctf_ui
> cross-env NODE_ENV=production webpack --config webpack.config.prod.js
Hash: 02d9906ed8de20816c5ec081957a5b69996bea7a
Version: webpack 4.46.0
Child
Hash: 02d9906ed8de20816c5e
Time: 413ms
Built at: 07/11/2022 5:15:20 PM
1 asset
Entrypoint main = main.js
[0] ./src/electron/electron.ts 2.83 KiB {0} [not cacheable] [built] [failed] [1 error]
ERROR in ./src/electron/electron.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
/home/daniel/ctf/tools/ctf_ui/node_modules/pkg-dir/index.js:5
const pkgDir = async cwd => {
^^^
SyntaxError: Unexpected identifier
at NativeCompileCache._moduleCompile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/find-cache-dir/index.js:5:16)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/babel-loader/lib/cache.js:26:22)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/babel-loader/lib/index.js:29:15)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at loadLoader (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/loadLoader.js:18:17)
at iteratePitchingLoaders (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at runLoaders (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
at NormalModule.doBuild (/home/daniel/ctf/tools/ctf_ui/node_modules/webpack/lib/NormalModule.js:295:3)
Child
Hash: c081957a5b69996bea7a
Time: 1041ms
Built at: 07/11/2022 5:15:21 PM
1 asset
Entrypoint gui = gui.js
[121] multi @babel/polyfill ./src/app/ui/index 40 bytes {0} [built]
[308] ./src/app/ui/index.tsx 2.83 KiB {0} [not cacheable] [built] [failed] [1 error]
+ 307 hidden modules
ERROR in ./src/app/ui/index.tsx
Module build failed (from ./node_modules/babel-loader/lib/index.js):
/home/daniel/ctf/tools/ctf_ui/node_modules/pkg-dir/index.js:5
const pkgDir = async cwd => {
^^^
SyntaxError: Unexpected identifier
at NativeCompileCache._moduleCompile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:240:18)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:184:36)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/find-cache-dir/index.js:5:16)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/babel-loader/lib/cache.js:26:22)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/daniel/ctf/tools/ctf_ui/node_modules/babel-loader/lib/index.js:29:15)
at Module._compile (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (/home/daniel/ctf/tools/ctf_ui/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at loadLoader (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/loadLoader.js:18:17)
at iteratePitchingLoaders (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at runLoaders (/home/daniel/ctf/tools/ctf_ui/node_modules/loader-runner/lib/LoaderRunner.js:365:2)
at NormalModule.doBuild (/home/daniel/ctf/tools/ctf_ui/node_modules/webpack/lib/NormalModule.js:295:3)
@ multi @babel/polyfill ./src/app/ui/index gui[1]
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = index.html
[2] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 2 hidden modules
npm ERR! Linux 5.15.0-39-generic
npm ERR! argv "/home/daniel/anaconda3/envs/pythonEnv3/bin/node" "/home/daniel/anaconda3/envs/pythonEnv3/bin/npm" "run" "build:prod"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ctf-ui@1.0.0 build:prod: `cross-env NODE_ENV=production webpack --config webpack.config.prod.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the ctf-ui@1.0.0 build:prod script 'cross-env NODE_ENV=production webpack --config webpack.config.prod.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ctf-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=production webpack --config webpack.config.prod.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ctf-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ctf-ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/daniel/ctf/tools/ctf_ui/npm-debug.log
npm ERR! Linux 5.15.0-39-generic
npm ERR! argv "/home/daniel/anaconda3/envs/pythonEnv3/bin/node" "/home/daniel/anaconda3/envs/pythonEnv3/bin/npm" "start"
npm ERR! node v6.13.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! ctf-ui@1.0.0 start: `npm run build:prod && npm run start:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ctf-ui@1.0.0 start script 'npm run build:prod && npm run start:prod'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ctf-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run build:prod && npm run start:prod
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ctf-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ctf-ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/daniel/ctf/tools/ctf_ui/npm-debug.log
Hello,
I am following the steps provided in the CTF_SUG.pdf documentation. I am able to activate my CTF environment by following the steps with seemingly nominal log output. However, once I arrive at the step to run the editor, the script to run the editor fails. It would be greatly appreciated to get any type of insight on what might be going wrong and if it the error indicates something I did incorrectly during setup.
Context: Ubuntu22.04 VMware, conda 4.5.11, Python 3.10.4 Error Log: