mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #4756] [bug]: pnpm dev results in dev:vite exits with code 1 #1780
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1780
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yousefmarey12 on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4756
Is there an existing issue for this?
Current behavior
so I am trying to spin up a dev server from my local machine in order to contribute to other GitHub issues for Hoppscotch. Docker uses a prebuilt image, so I can't modify source code and see my changes while using docker. I was recommended to use
pnpm dev. The development server runs perfectly until I visitlocalhost:3000and thendev:vitejust crashes with code 1.Another hint is that when I open
localhost:3000, there is a bunch of connection refused and empty response from the network tabs, which is quite strange. Perhaps anything to do with proxies or the WebSocket?Keep in mind I am using WSL Ubuntu and Node version 20.18.3
Would be happy to answer questions or concerns about the question or my system.
Thanks
Steps to reproduce
.
Environment
Production
Version
Self-hosted
@xTudoS commented on GitHub (Feb 27, 2025):
Would you provide more log info about the vite?
@yousefmarey12 commented on GitHub (Mar 2, 2025):
@xTudoS It could be a socket connection error? This is what the logs in the console have been telling.
@xTudoS commented on GitHub (Mar 2, 2025):
Looks like you didn't setup the .env file
@yousefmarey12 commented on GitHub (Mar 2, 2025):
@xTudoS
Oh, I actually did setup the
.envfile. What I exactly did was copy and paste the.env.examplefile into a new.envfile. Then I installed the packages successfully withpnpm iand then I ranpnpm dev.Here is my
.envfile:I just copied and pasted it, maybe there is some parsing error? Or do I need to change any of the configurations?
Thanks
@xTudoS commented on GitHub (Mar 3, 2025):
@yousefmarey12 try updating the database url
=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
this is probably the default to run using docker
if you are not, hoppscotch-db will not solve for any Ip address
you need to have Postgres installed and create an empty database for hoppscotch to use
and then update this line, where
postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
postgres = Postgres user you setup in the installation
testpass = Postgres password you setup in the installation
hoppscotch-db = postgres hostname / ip -> if its running in the same machine probably will be localhost or 127.0.0.1
5432: Default port for postgres, no need to change
hoppscotch = the database you created for hoppscotch
@yousefmarey12 commented on GitHub (Mar 3, 2025):
@xTudoS
Unfortunately still no luck.
What I did was follow these commands:
sudo service postgresql startand then I just put the appropriate values in the link. Is there supposed to be something running like a PostgreSQL service as there's nothing running when analyzing my ports. Am I missing any other commands?
Thanks
@xTudoS commented on GitHub (Mar 3, 2025):
@yousefmarey12 would you mind install pgadmin and try access your database?
pgadmin is an administrative interface for postgres
@yousefmarey12 commented on GitHub (Mar 3, 2025):
@xTudoS Will do now.
@yousefmarey12 commented on GitHub (Mar 3, 2025):
@xTudoS
Hi,
I accessed my database, but it still crashing. I believe the
vitecommand is the one that's the problem. Maybe there is a connection?@xTudoS commented on GitHub (Mar 4, 2025):
@yousefmarey12 try
pnpm -r do-dev@yousefmarey12 commented on GitHub (Mar 4, 2025):
@xTudoS Still no luck.
I even tried it on different browsers, and the web socket is still not connecting. I do not want to play with any of the vite configurations as if it worked with other people, the problem is probably with my system. A hint is the following log:
Could it be something wrong with my network and not Vite? Any suggestions?
@yousefmarey12 commented on GitHub (Mar 4, 2025):
@jamesgeorge007 , do you perhaps have an idea on what is going on? I would really appreciate your suggestion.
@xTudoS commented on GitHub (Mar 4, 2025):
@yousefmarey12 yeah
the problem is the server not starting,
would you mind sharing the full log of the vite?
you can try to run the docker version as well
install docker and in the terminal type
docker compose up@yousefmarey12 commented on GitHub (Mar 4, 2025):
@xTudoS
The problem with Docker is that I need the application to run from the source code and not a pre-built image. This is only for debugging purposes so I can solve other issues in this repository.
Regarding Vite's full log, is it just a flag on
pnpm dev? If you know the specific flag for seeing the logs for vite, that would be great. (I triedpnpm --debug dev)@yousefmarey12 commented on GitHub (Mar 16, 2025):
@xTudoS
Hi,
If you contribute to this repo via code modification, how do you spin up a development server to test your changes?
Thanks