pullflow-ai / sample-redwood

The App Framework for Startups
https://redwoodjs.com
MIT License
0 stars 0 forks source link

[Bug?]: #34

Open efe-pullflow opened 1 week ago

efe-pullflow commented 1 week ago

What's not working?

I am following the tutorial here https://redwoodjs.com/tutorial/installation-starting-development, and am running into an error. Here are my project files (just the generated starter files minus the node_modules folder) and the commands I've run:

Project zip: redwoodblog.zip

`$ yarn create redwood-app ./redwoodblog

yarn create v1.22.4 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... [3/4] 🔗 Linking dependencies... [4/4] 🔨 Building fresh packages... success Installed "create-redwood-app@0.4.0" with binaries:

Thanks for trying out Redwood! We've created your app in '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog'

Inside that directory you can run yarn rw dev to start the development server. ✨ Done in 119.41s.

Error Output: yarn rw dev `

Here is the output:

yarn run v1.22.4
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/rw' dev
✖ Generating the Prisma client...
→ info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Command failed with exit code 1: yarn prisma2 generate
Error: Cannot call write after a stream was destroyed
error Command failed with exit code 1.
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/prisma2' generate
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/dev-server'
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/webpack-dev-server' --config ../node_modules/@redwoodjs/core/config/webpack.development.js
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/prisma2' generate --watch
21:39:28 db | Error: Cannot call write after a stream was destroyed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:28 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
21:39:28 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch restarted
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/prisma2' generate --watch
21:39:30 db | Error: Cannot call write after a stream was destroyed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:30 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
21:39:30 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch restarted
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/prisma2' generate --watch
21:39:30 web | ℹ 「wds」: Project is running at http://localhost:8910/
21:39:30 web | ℹ 「wds」: webpack output is served from /
21:39:30 web | ℹ 「wds」: Content not from webpack is served from /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/web
21:39:30 web | ℹ 「wds」: 404s will fallback to /index.html
21:39:33 db | Error: Cannot call write after a stream was destroyed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:33 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
21:39:33 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch restarted
21:39:33 api | /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3
21:39:33 api | throw new Error(
21:39:33 api | ^
21:39:33 api |
21:39:33 api | Error: @prisma/client did not initialize yet. Please run "prisma2 generate" and try to import it again.
21:39:33 api | In case this error is unexpected for you, please report it in https://github.com/prisma/prisma-client-js/issues/390.
21:39:33 api | at new PrismaClient (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3:11)
21:39:33 api | at Object. (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api/src/lib/db.js:6:19)
21:39:33 api | at Module._compile (internal/modules/cjs/loader.js:1147:30)
21:39:33 api | at Module._compile (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:99:24)
21:39:33 api | at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
21:39:33 api | at Object.newLoader [as .js] (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:104:7)
21:39:33 api | at Module.load (internal/modules/cjs/loader.js:996:32)
21:39:33 api | at Function.Module._load (internal/modules/cjs/loader.js:896:14)
21:39:33 api | at Module.require (internal/modules/cjs/loader.js:1036:19)
21:39:33 api | at require (internal/modules/cjs/helpers.js:72:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:33 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server exited with code 1
21:39:33 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server restarted
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/prisma2' generate --watch
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/dev-server'
21:39:35 db | Error: Cannot call write after a stream was destroyed
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:35 db | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn prisma2 generate --watch exited with code 1
21:39:37 api | /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3
21:39:37 api | throw new Error(
21:39:37 api | ^
21:39:37 api |
21:39:37 api | Error: @prisma/client did not initialize yet. Please run "prisma2 generate" and try to import it again.
21:39:37 api | In case this error is unexpected for you, please report it in https://github.com/prisma/prisma-client-js/issues/390.
21:39:37 api | at new PrismaClient (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3:11)
21:39:37 api | at Object. (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api/src/lib/db.js:6:19)
21:39:37 api | at Module._compile (internal/modules/cjs/loader.js:1147:30)
21:39:37 api | at Module._compile (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:99:24)
21:39:37 api | at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
21:39:37 api | at Object.newLoader [as .js] (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:104:7)
21:39:37 api | at Module.load (internal/modules/cjs/loader.js:996:32)
21:39:37 api | at Function.Module._load (internal/modules/cjs/loader.js:896:14)
21:39:37 api | at Module.require (internal/modules/cjs/loader.js:1036:19)
21:39:37 api | at require (internal/modules/cjs/helpers.js:72:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:38 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server exited with code 1
21:39:38 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server restarted
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/dev-server'
21:39:43 api | /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3
21:39:43 api | throw new Error(
21:39:43 api | ^
21:39:43 api |
21:39:43 api | Error: @prisma/client did not initialize yet. Please run "prisma2 generate" and try to import it again.
21:39:43 api | In case this error is unexpected for you, please report it in https://github.com/prisma/prisma-client-js/issues/390.
21:39:43 api | at new PrismaClient (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3:11)
21:39:43 api | at Object. (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api/src/lib/db.js:6:19)
21:39:43 api | at Module._compile (internal/modules/cjs/loader.js:1147:30)
21:39:43 api | at Module._compile (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:99:24)
21:39:43 api | at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Object.newLoader [as .js] (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:104:7)
21:39:43 api | at Module.load (internal/modules/cjs/loader.js:996:32)
21:39:43 api | at Function.Module._load (internal/modules/cjs/loader.js:896:14)
21:39:43 api | at Module.require (internal/modules/cjs/loader.js:1036:19)
21:39:43 api | at require (internal/modules/cjs/helpers.js:72:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:43 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server exited with code 1
21:39:43 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server restarted
$ '/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/.bin/dev-server'
21:39:49 api | /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3
21:39:49 api | throw new Error(
21:39:49 api | ^
21:39:49 api |
21:39:49 api | Error: @prisma/client did not initialize yet. Please run "prisma2 generate" and try to import it again.
21:39:49 api | In case this error is unexpected for you, please report it in https://github.com/prisma/prisma-client-js/issues/390.
21:39:49 api | at new PrismaClient (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/@prisma/client/index.js:3:11)
21:39:49 api | at Object. (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api/src/lib/db.js:6:19)
21:39:49 api | at Module._compile (internal/modules/cjs/loader.js:1147:30)
21:39:49 api | at Module._compile (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:99:24)
21:39:49 api | at Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
21:39:49 api | at Object.newLoader [as .js] (/Users/Andrew/RedwoodJS_Tutorial/redwoodblog/node_modules/pirates/lib/index.js:104:7)
21:39:49 api | at Module.load (internal/modules/cjs/loader.js:996:32)
21:39:49 api | at Function.Module._load (internal/modules/cjs/loader.js:896:14)
21:39:49 api | at Module.require (internal/modules/cjs/loader.js:1036:19)
21:39:49 api | at require (internal/modules/cjs/helpers.js:72:18)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
21:39:49 api | cd /Users/Andrew/RedwoodJS_Tutorial/redwoodblog/api && yarn dev-server exited with code 1

### How do we reproduce the bug?

_No response_

### What's your environment? (If it applies)

```shell
$ node -v
v13.12.0
$ yarn -v
1.22.4

Are you interested in working on this?

test-et-pullflow-ai[bot] commented 1 week ago

Hi @efe-pullflow, I'm test-et-pullflow-ai, here to help with your issue.

The error you're encountering seems related to the Prisma client not being properly initialized. A few steps you can try to resolve this issue:

  1. Ensure Prisma is properly installed: Run yarn prisma generate in the root directory of your project to ensure that the Prisma client is generated.

  2. Check Node.js and Yarn versions: While you provided your versions, sometimes issues can arise due to compatibility. Consider upgrading to the latest stable versions of Node.js and Yarn.

  3. Prisma and RedwoodJS versions: Make sure you're using compatible versions of Prisma and RedwoodJS. Sometimes, updating to the latest versions can resolve these types of issues.

  4. Delete node_modules and reinstall: Sometimes, clearing out node_modules and running yarn install again can resolve dependency issues.

If none of these steps work, could you provide more details about any modifications you've made to the generated files? This information might help in diagnosing the issue further.

Let me know if you need further assistance!