Currently, I am diligently following a tutorial and ensuring that each step is completed accurately. My goal is to locally host my javascript app at localhost:3000. Unfortunately, I am facing difficulties as every attempt to run npm run dev
results in an error log displaying the following:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'dev' ]
2 info using <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="650b150825534b54514b51">[email protected]</a>
3 info using <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2a44454e4f6a5c1b1a041b13041a">[email protected]</a>
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="37475245445859565b405255445e4352770719071907">[email protected]</a>~predev: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="19697c6b6a767778756e7c7b6a706d7c592937293729">[email protected]</a>
6 info lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="28584d5a5b474649445f4d4a5b415c4d681806180618">[email protected]</a>~dev: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="12627760617d7c737e657770617b667752223c223c22">[email protected]</a>
7 verbose lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6c1c091e1f03020d001b090e1f0518092c5c425c425c">[email protected]</a>~dev: unsafe-perm in lifecycle true
8 verbose lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="99e9fcebeaf6f7f8f5eefcfbeaf0edfcd9a9b7a9b7a9">[email protected]</a>~dev: PATH: /usr/share/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/omar-backup/Desktop/MrBoogle.github.io/personalWebsite/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
9 verbose lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="62120710110d0c030e150700110b160722524c524c52">[email protected]</a>~dev: CWD: /home/omar-backup/Desktop/MrBoogle.github.io/personalWebsite
10 silly lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="37475245445859565b405255445e4352770719071907">[email protected]</a>~dev: Args: [ '-c', 'vite' ]
11 silly lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8bfbeef9f8e4e5eae7fceee9f8e2ffeecbbba5bba5bb">[email protected]</a>~dev: Returned: code: 1 signal: null
12 info lifecycle <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c1b1a4b3b2aeafa0adb6a4a3b2a8b5a481f1eff1eff1">[email protected]</a>~dev: Failed to exec dev script
13 verbose stack Error: <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f8889d8a8b979699948f9d9a8b918c9db8c8d6c8d6c8">[email protected]</a> dev: `vite`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/share/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dfafbaadacb0b1beb3a8babdacb6abba9feff1eff1ef">[email protected]</a>
15 verbose cwd /home/omar-backup/Desktop/MrBoogle.github.io/personalWebsite
16 verbose Linux 5.4.0-26-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
18 verbose node v10.19.0
19 verbose npm v6.14.4
20 error code ELIFECYCLE
21 error errno 1
22 error <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f9899c8b8a969798958e9c9b8a908d9cb9c9d7c9d7c9">[email protected]</a> dev: `vite`
22 error Exit status 1
23 error Failed at the <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="70001502031f1e111c0715120319041530405e405e40">[email protected]</a> dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
After spending nearly an hour trying to troubleshoot this issue fruitlessly, I've installed vite without success. Instead of hosting my app on localhost:3000, a strange window appears using qt5ct. Unfortunately, this method no longer works due to potential errors caused by my attempts to resolve the initial hosting problem.
You can find the tutorial I'm referencing here. Specifically, my challenges arise around the 2:45 mark.