Faith
Faith
Explore posts from servers
RRailway
Created by Faith on 7/1/2024 in #✋|help
What PNPM version is being ran on railway?
Hey i keep getting the following error
0.838  ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

0.838

0.838 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
0.838  ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

0.838

0.838 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
And i think its because of its geenrating the lock file from 2 different versions
6 replies
RRailway
Created by Faith on 6/26/2024 in #✋|help
Sentry auth token help
Hey guys im having a small issue with sentry token when i try to push my project i get the following error in my code and that error crashes my whole app
error: Auth token is required for this request. Please run `sentry-cli login` and try again!

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.

Please attach the full debug log to all bug reports.
error: Auth token is required for this request. Please run `sentry-cli login` and try again!

Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.

Please attach the full debug log to all bug reports.
Where do i provide the Auth token since the .sentryclirc is in the .gitingore
import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from '@sentry/profiling-node';

// Ensure to call this before importing any other modules!
Sentry.init({
dsn: "https://*.*.de.sentry.io/*",
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],

// Add Tracing by setting tracesSampleRate
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
import * as Sentry from "@sentry/node";
import { nodeProfilingIntegration } from '@sentry/profiling-node';

// Ensure to call this before importing any other modules!
Sentry.init({
dsn: "https://*.*.de.sentry.io/*",
integrations: [
// Add our Profiling integration
nodeProfilingIntegration(),
],

// Add Tracing by setting tracesSampleRate
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set sampling rate for profiling
// This is relative to tracesSampleRate
profilesSampleRate: 1.0,
});
i have this setup right now
26 replies
RRailway
Created by Faith on 6/25/2024 in #✋|help
Typeorm migration run
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org define-waters --project node-express ./build && sentry-cli sourcemaps upload --org define-waters --project node-express ./build"
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org define-waters --project node-express ./build && sentry-cli sourcemaps upload --org define-waters --project node-express ./build"
hey guys i hvae this issue with when my migrations are being synced/generated it some how fails and wont run due to there no migration being generated ( which is okay, dont make if cant find ) but for some reason when it hits the migration:run the app starts over from zero again -.-
36 replies
RRailway
Created by Faith on 6/24/2024 in #✋|help
Database migrations are not being run with typeorm
Hello everyone i have been trying for ours trying to get my typeorm mirgrations to run it has access to the database because it created a "migrations" table BUT it wont go in and generate the nessecary migrations and apply them sadly. and i get no error! there are my scripts
"scripts": {
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs"
},
"scripts": {
"start": "sleep 3 && tsc && pnpm run sync && pnpm run migrate:run && node ./build/index.js",
"sync": "pnpm typeorm migration:generate /app/build/migration/Init -o -d /app/build/data-source.js",
"migrate:run": "pnpm typeorm migration:run -d /app/build/data-source.js",
"typeorm": "npx typeorm-ts-node-commonjs"
},
28 replies
PPrisma
Created by Faith on 4/24/2024 in #help-and-questions
Error validating datasource `db`: the URL must start with the protocol `prisma://`
Hello everyone! Im currently getting this problem that i descriped in the title. where when i try to run Prisma on cloudflare workers i tried the soultion from here "https://www.prisma.io/docs/orm/reference/prisma-client-reference#programmatically-override-a-datasource-url" but cant seem to get it to work .dev.vars DATABASE_URL="DATABASE_URL=postgresql://postgres:@localhost:5432/postgres?schema=test" this is my prisma client
import { PrismaClient } from "@prisma/client/edge";

export const db = new PrismaClient({
datasources: {
db: {
url: 'file:../src/dev.vars',
},
},
})
import { PrismaClient } from "@prisma/client/edge";

export const db = new PrismaClient({
datasources: {
db: {
url: 'file:../src/dev.vars',
},
},
})
my schema.prisma
generator client {
provider = "prisma-client-js"
engineType = "binary"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
engineType = "binary"
}

datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
and when i try to add "prisma://" in the front it says "api key needed"
13 replies
RRailway
Created by Faith on 4/18/2024 in #✋|help
Larvel API wakes up from nap with a error but when hit again with another request it works
No description
17 replies
CDCloudflare Developers
Created by Faith on 4/18/2024 in #workers-help
inconsistent error with Cloudflare worker queues. TypeError: Can't read from request stream because
Hello guys, im currently working on a POC where i try and make a nice starter template. im currently getting this issue when trying to run my queue and read the response "TypeError: Can't read from request stream because client disconnected." i would also like to add that it works sometimes but then when i refresh it throws that error this is my code
import { Hono } from 'hono'
import { logger } from 'hono/logger'

type Environment = {
readonly MY_QUEUE: Queue<any>;
};

const app = new Hono<{
Bindings: Environment;
}>();

app.use(logger())

app.get('/', (c) => {
c.env.MY_QUEUE.send({"hello": "world"})
return c.text('Hello Hono!')
})

export default {
fetch: app.fetch,
scheduled: async (event, env, ctx) => {
// console.log("scheduled: ", event, env, ctx)
},
async queue(batch: MessageBatch, env: Environment) {
let file = "";
for (const message of batch.messages) {
console.log(message)
const error = message.body;

file += error.hello + "\n";
}

console.log(file)
},
}
import { Hono } from 'hono'
import { logger } from 'hono/logger'

type Environment = {
readonly MY_QUEUE: Queue<any>;
};

const app = new Hono<{
Bindings: Environment;
}>();

app.use(logger())

app.get('/', (c) => {
c.env.MY_QUEUE.send({"hello": "world"})
return c.text('Hello Hono!')
})

export default {
fetch: app.fetch,
scheduled: async (event, env, ctx) => {
// console.log("scheduled: ", event, env, ctx)
},
async queue(batch: MessageBatch, env: Environment) {
let file = "";
for (const message of batch.messages) {
console.log(message)
const error = message.body;

file += error.hello + "\n";
}

console.log(file)
},
}
1 replies
RRailway
Created by Faith on 3/7/2024 in #✋|help
Help with setup of laravel cmds on project deployment
Hello everyone so im hosting a laravel rest api but i cant seem to access the terminal and run cmds to seed the database etc, i want to seed the database on every start up
52 replies
RRailway
Created by Faith on 1/31/2024 in #✋|help
Input commands
Hello everyone is it possible run cmds such as php artisan schedule or config clear via a terminal?
4 replies
RRailway
Created by Faith on 1/30/2024 in #✋|help
GetAddrInfoReqWrap.onlookup FAILING my deployment
GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:108:26) { #12 7.515 errno: -3008, #12 7.515 code: 'ENOTFOUND', #12 7.515 syscall: 'getaddrinfo', #12 7.515 hostname: 'postgres.railway.internal' #12 7.515 } hey everyone i get this error and i have no idea why this is happening it worked perfectly before adding migrations being build beforehand
68 replies
RRailway
Created by Faith on 1/30/2024 in #✋|help
Run TypeOrm Migrations
Hello everyone! Quick question about running all my migrations for my application Im currently using Typeorm and Expressjs and im kind of stuck on how i should migrate and i tried googling but no help, thought i would ask in here what you guys do?
12 replies