Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@fortawesome and lodash are not found #512

Open
agarrubio opened this issue Oct 10, 2023 · 6 comments
Open

@fortawesome and lodash are not found #512

agarrubio opened this issue Oct 10, 2023 · 6 comments

Comments

@agarrubio
Copy link

The problem is that chrome cannot find @fortawesome and lodash. I don't know JS or WEB technologies, but I think I followed the instructions correctly. I have also tried the assistance of GPT4 without success. Please help me!

I installed wetty this way:

git clone https://github.com/butlerx/wetty.git
cd wetty
npm -g i wetty

I run wetty this way:

wetty --ssh-host=localhost --ssh-port=22 --ssh-user=alejandro --ssh-pass="$my_password" -p 2526

The initial output to my linux terminal is:

{"base":"/wetty/","label":"Wetty","level":"info","message":"Starting server","port":2526,"timestamp":"2023-10-10T16:57:45.103Z","title":"WeTTY - The Web Terminal Emulator"}
{"connection":"http","label":"Wetty","level":"info","message":"Server started","port":2526,"timestamp":"2023-10-10T16:57:45.110Z"}

When I open the page http://localhost:2526/wetty, I get this in my linux terminal:

{"label":"Wetty","level":"http","message":"GET /wetty 304 4ms","meta":{"req":{"headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9,es;q=0.8,so;q=0.7","cache-control":"max-age=0","connection":"keep-alive","cookie":"_xsrf=2|4c046e4d|bf448b14019adfa8ff41cedd9987ba66|1695758063; username-localhost-8888=\"2|1:0|10:1695758077|23:username-localhost-8888|200:eyJ1c2VybmFtZSI6ICJlNmZjZGFkOWMwYmQ0ZDM0YmIyZDA3NWMyZWE5ZmQzNSIsICJuYW1lIjogIkFub255bW91cyBDaGFsZGVuZSIsICJkaXNwbGF5X25hbWUiOiAiQW5vbnltb3VzIENoYWxkZW5lIiwgImluaXRpYWxzIjogIkFDIiwgImNvbG9yIjogbnVsbH0=|ca69ed7d087a3c3c45bbca80cd30f35d8a9a5554eb4f35605f3b8ecb329eee8b\"","dnt":"1","host":"localhost:2526","if-none-match":"W/\"472-S2vHeHsLjCISBT3Di/V0rk/j5T8\"","sec-ch-ua":"\"Google Chrome\";v=\"117\", \"Not;A=Brand\";v=\"8\", \"Chromium\";v=\"117\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Linux\"","sec-fetch-dest":"document","sec-fetch-mode":"navigate","sec-fetch-site":"none","sec-fetch-user":"?1","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"},"httpVersion":"1.1","method":"GET","originalUrl":"/wetty","query":{},"url":"/wetty"},"res":{"statusCode":304},"responseTime":4},"timestamp":"2023-10-10T16:57:54.291Z"}

And this error in Google Chrome console:

Uncaught TypeError: Failed to resolve module specifier "@fortawesome/fontawesome-svg-core". Relative references must start with either "/", "./", or "../".

The file for wetty.js is at:

/home/alejandro/.npm-packages/lib/node_modules/wetty/build/client/wetty.js

and the first lines of that file are:

import {dom, library} from "@fortawesome/fontawesome-svg-core";
import {faCogs} from "@fortawesome/free-solid-svg-icons";
import _ from "lodash";
import {disconnect} from "./wetty/disconnect.js";
import {overlay} from "./wetty/disconnect/elements.js";
import {verifyPrompt} from "./wetty/disconnect/verify.js";

@fortawesome and lodash are at:

/home/alejandro/.npm-packages/lib/node_modules/wetty/node_modules/lodash
/home/alejandro/.npm-packages/lib/node_modules/wetty/node_modules/@fortawesome/

Which file do I need to "patch" or move to have this working. Would using --base a solution? If so, which should be its value?

@Youssef2Galiot
Copy link

Hi agarrubio,

I have same problem and i dont find a solution yet. Otherwise i tested the compilaton of package using ./configure and make . and then start using npm start it work but i cant't until now run wetty in command mode. also the modification the json conf file has no impact on wetty in this mode :-( . i continue troublshouting. you can try to test compilation method

@Youssef2Galiot
Copy link

i clarify : i can start wetty in commande mode but i reveive the same errors as you concerning import modules. i try to give the full path but no result...

@GiGurra
Copy link

GiGurra commented Dec 1, 2023

Same problem here. Wetty not usable unfortunately, just a black screen

@kyky775v2
Copy link

I think Wetty's dependencies cannot be used in web clients.
The only way is to downgrade and use the version until it is fixed.

npm uninstall -g wetty
npm install -g wetty@2.5.0

@idreamerhx
Copy link

same bug, and same bug , and same bug please test before tag

@kyky775v2
Copy link

I already tested it, no problem in version 2.5.0
It worked perfectly in my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants