@rob I did. I can see the table in my DB, and here’s the migration.sql file it generated
-- CreateTable
CREATE TABLE "User" (
"id" SERIAL NOT NULL,
"name" TEXT,
"email" TEXT NOT NULL,
"hashedPassword" TEXT NOT NULL,
"salt" TEXT NOT NULL,
"resetToken" TEXT,
"resetTokenExpiresAt" TIMESTAMP(3),
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
Not only did the build complete, but now I’m able to register and log in even though I’m running on dev? Not sure if I overlooked something when I was troubleshooting or if yarn rw build actually fixed the problem somehow.
When you run build it does compile the app into the dist directories in web and api, but when you run yarn rw dev it still starts from scratch like normal, it doesn’t care about dist.
Maybe there was something weird with the types in there and build fixed them! If you look in the .redwood dir there’s a bunch of secret stuff there that we use internally to activate a bunch of functionality. Redwood’s usually really good about keeping that all up to date whenever you modify and save files but maybe something got stuck?
I did upgrade, and I was just seeing that. I know I have ipv6 disabled cause it was causing some issues when installing rails gems with bundler for work.
I did what the thread suggested: RWJS_DEV_API_URL="http://localhost" yarn rw dev
but now I am getting:
web | <e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8910/auth?method=getToken to http://localhost:8911/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors)
That sounds like the API server isn’t running at all…try doing a yarn rw build, and if that works try yarn rw serve to serve it in production mode and see if that does anything different.
with yarn rw serve it works perfect but I took it down and ran again with yarn rw dev and RWJS_DEV_API_URL=“http://localhost” yarn rw dev as well and both fail again with the same error
Is there a previous commit to that where you upgraded to v1.0? If you roll back to before that, then apply these schema changes, wonder if it still happens?
Interestingggg What if you leave the database changes in place, but remove the changes to auth.js? That’s the only thing that should be affecting to the API server… this is warping my mind, I don’t see how adding those fields would have anything to do with the web side trying to send a request to the IPv6 endpoint like people are complaining about in that other thread…
I’m running out of ideas here. Might be time to call in backup! @dthyresson any idea what’s going on and if it’s related to that other thread? I gotta think these are related, it’s such a weird, specific error.
Some context about rw dev: It tries to start up api and web side in parallel, but sometimes when api side takes a little bit longer than the web to start then the web (which is trying to proxy the apiUrl) prints these in logs. Or if there’s some error while starting the api server but it would have printed the error, which is not the case here.
But if there’s no log saying api server running after proxy error logs then something is definitely up. @aguscha333 Can you try to access localhost:8910/.redwood/functions/graphql after running yarn rw dev? It should show GraphQL if everything worked.
I litteraly didn’t change anything just ran yarn rw dev again after a day of doing sth else and now is working, I have no idea why, I didn’t change anything. But yey at least it’s working.
I did restart my laptop due to unrelated stuff now that I think of it. Maybe it had do with that.