GithubHelp home page GithubHelp logo

Comments (5)

MichaelDeBoey avatar MichaelDeBoey commented on April 20, 2024

This is probably related to the changes from #106

@joeleonard212 Could you please explain the error that you're seeing?

from indie-stack.

mcansh avatar mcansh commented on April 20, 2024

yeah @joeleonard212 I'm not seeing any issues on a freshly created indie-stack so if there's any specific errors you're seeing that would be helpful https://gist.github.com/mcansh/8e4bfd21f2f8de96ab00989d8aa15154

from indie-stack.

joeleonard212 avatar joeleonard212 commented on April 20, 2024

yeah, this error is referred to the blog-tutorial.

I mean, picking the typescript flavour I was expecting to find Prisma in typescript as well.

The seed.js cannot be parsed correctly with the following error:

Parsing error: Cannot find module '@babel/preset-react'

basically, this breaks the workflow of the tutorial. not sure if fixing this dependency would solve, maybe other error would occur later

from indie-stack.

moishinetzer avatar moishinetzer commented on April 20, 2024

This is probably related to the commit which changed the prisma seed command to use node instead of ts-node and changed seed.ts to seed.js.

Could you revert the above changes in package.json and see if that fixes anything?

from indie-stack.

flyingwolf1701 avatar flyingwolf1701 commented on April 20, 2024

Hello @moishinetzer I did try and change my code to reflect what you said. Additionally in app/posts/index.tsx I had to replace the first two lines with:

import { PrismaClient } from "@prisma/client"; import bcrypt from "bcryptjs";

from

const { PrismaClient } = require("@prisma/client"); const bcrypt = require("bcryptjs");

I think the issue is that the blog tutorial hasn't bee updated. The problem I am getting is:

Property 'post' does not exist on type 'PrismaClient<PrismaClientOptions, never, RejectOnNotFound | RejectPerOperation | undefined>'.

That issue is pointing at the line given in the tutorial:
for (const post of posts) { await prisma.post.upsert({ where: { slug: post.slug }, update: post, create: post, }); }

It doesn't like the post in await prisma.post.upsert.
I am guessing that the post type in PrismaClientOptions is also screwed up. I am sure this little issue is making a lot of new people turn away from Remix which is a shame because this is pretty amazing stuff.

It would be really amazing if the tutorial was made functional again! Lord knows I am trying but I don't understand the core technologies enough yet.

from indie-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.