Giter VIP home page Giter VIP logo

create-redwood-app's People

Contributors

ackinc avatar amorriscode avatar biphobe avatar cannikin avatar dependabot[bot] avatar dhausser avatar forresthayes avatar gfpacheco avatar guledali avatar jtoar avatar jvanbaarsen avatar leonardoelias avatar michelegera avatar mojombo avatar nikolasburk avatar paulkarayan avatar peterp avatar robertbroersma avatar satyarohith avatar terris avatar thedavidprice avatar thieffen avatar zackmckenna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-redwood-app's Issues

`yarn create redwood-app ./redwoodblog` fails on every OS

I just found Redwood today and was excited to start the tutorial at https://redwoodjs.com/tutorial/installation-starting-development

Unfortunately yarn create redwood-app ./redwoodblog does not work for me:

success Installed "[email protected]" with binaries:
      - create-redwood-app
internal/modules/cjs/loader.js:1174
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/vagrant/.config/yarn/global/node_modules/is-promise/index.js
require() of ES modules is not supported.
require() of /home/vagrant/.config/yarn/global/node_modules/is-promise/index.js from /home/vagrant/.config/yarn/global/node_modules/listr/lib/task.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/vagrant/.config/yarn/global/node_modules/is-promise/package.json.

I have tried on Mac, Windows 10 in PowerShell as Admin, and Homestead Vagrant Ubuntu VM on Win 10 host. They all fail at this very first step.

We ❤️ #Hacktoberfest: Here's How to Contribute to Redwood

Welcome! We are excited you're interested in contributing to Redwood for #Hacktoberfest You'll be in good company with over 120+ other project contributors 🚀

Note: we have been following the update Hacktoberfest Guidelines as best we can. If you see anything missing from our setup, just let us know. And the last week of October we'll sort through PRs that might not get merged in time and add the hacktoberfest-accepted label — however, it will help us if you remind us the last week via a comment on an open PR.

Redwood is a Community

The most important thing you need to know is that Redwood consists of a vibrant community of people from all over the world. Together we believe that making each other successful with Redwood is how we make Redwood successful. The best ways to get connected to the community are to reach out:

Please introduce yourself! And don't forget to lead with gratitude and generosity, which encourages others to respond with like-kind. 😃

Getting Started

What: Find something you're excited to contribute 🎉

Find an Existing Issue

There are three Redwood Projects participating in Hacktoberfest:

  1. Framework
  2. Website and Docs
  3. Installation Template

For each of these projects, we have a label for good-first-issue, which you may find helpful. For example, here are the issues labeled for the Framework:

And for #Hacktoberfest we have a specific label as well.

Create a New Issue: Contributions we'll accept

If this is your first time contributing, we recommend starting with an existing issue.

For other contributions, we are looking specifically for help getting Redwood to v1.0. The best place to start is by reading the v1.0 Roadmap and looking at the project boards for categories of interest:

You'll want to start by first opening an Issue and proposing a problem + solution. Often it helps to show some example code. But this is meant to be a lightweight first-step to start a conversation. We don't want you to go to a bunch of work up-front only to find out it's not a fit. When in doubt, just ask!

How: What you need to know to contribute

Once you've found something you're excited to work on, the next step is learning how to make a contribution.

The first step is to read through the Contributing doc on our website:

This includes a lot of links to other docs and guides you'll need depending on which project you want to work on.

Questions?

We understand that setting up a local environment isn't trivial. Once you've taken a look at the docs and done the initial setup, please don't hesitate to reach out with questions if anything is in your way. We'd be happy to help!

Otherwise, we'll be watching this Issue as well. Please comment in this thread and someone will reply when they're available.

Happy hacking! 👩‍💻👨‍💻👕

Remove photon excludes from .gitignore

I think this is from when Photon was generated into /api?

node_modules/
yarn-error.log
.netlify
dist/
dist-babel/

dev.db
# the photon package will be removed once it is generated properly.
packages/photon/index.js
packages/photon/index.d.ts
packages/photon/runtime/

Error: @prisma/client did not initialize yet

I'm following the tutorial and I've caught a snag in the step which has me run yarn rw dev

prisma/prisma-client-js#390 was mentioned in the error output. Not sure if that's the culprit or not.

I'm running node v12.16.1 and yarn 1.22.4.

chris@2020bravo:~/Documents/sbtp-loyalty$ yarn rw dev
yarn run v1.22.4
$ /home/chris/Documents/sbtp-loyalty/node_modules/.bin/rw dev
$ /home/chris/Documents/sbtp-loyalty/node_modules/.bin/dev-server
$ /home/chris/Documents/sbtp-loyalty/node_modules/.bin/webpack-dev-server --config ../node_modules/@redwoodjs/core/config/webpack.development.js
api | Running at 'http://localhost:8911'
api | Watching files in '/home/chris/Documents/sbtp-loyalty/api/src/functions'
web | ℹ 「wds」: Project is running at http://localhost:8910/
web | ℹ 「wds」: webpack output is served from /
web | ℹ 「wds」: Content not from webpack is served from /home/chris/Documents/sbtp-loyalty/web
web | ℹ 「wds」: 404s will fallback to /index.html
api | 
api | Error: @prisma/client did not initialize yet. Please run "prisma generate" and try to import it again.
api | In case this error is unexpected for you, please report it in https://github.com/prisma/prisma-client-js/issues/390.
api | 
api | at /home/chris/Documents/sbtp-loyalty/api/src/lib/db.js(anonymous):6
api | 1  // See https://github.com/prisma/prisma2/blob/master/docs/prisma-client-js/api.md#constructor
api | 2  // for options.
api | 3  
api | 4  import { PrismaClient } from '@prisma/client'
api | 5  
api | 6  export const db = new PrismaClient()
api | 7  
api | 
api | 1 new PrismaClient
api |   /home/chris/Documents/sbtp-loyalty/node_modules/.prisma/client/index.js:3
api | 
api | 2 Module._compile
api |   /home/chris/Documents/sbtp-loyalty/node_modules/pirates/lib/index.js:99
api | 
api | 3 Object.newLoader [as .js]
api |   /home/chris/Documents/sbtp-loyalty/node_modules/pirates/lib/index.js:104
api | 

Issue: v0.13.0 of redwood generate auth CLI fails to add the getCurrentUser import

Issue: Running yarn rw g auth [provider] in an app created by v0.13.0 of yarn create redwood-app [directory] fails to add import { getCurrentUser } from 'src/lib/auth.js' as part of the generator command to /api/src/functions/graphql.js

Previously, this worked in version v0.12.0.

The issue is happening because the Redwood CLI generate auth command looks for a /^(.*importAll.*)$/m, regex match to add the getCurrentUser import (https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/generate/auth/auth.js#L96-L100) but the importAll macro was replaced by a babel plugin import in the v0.13.0 release (bc4e93d).

And this then causes the currentUser object to return as an array and fail to get logged in user email when the useAuth() hook is used.

import { useAuth } from '@redwoodjs/auth'
const { logIn, logOut, isAuthenticated, currentUser } = useAuth()
...
{ isAuthenticated && <li>{currentUser.email}</li> }

The above useAuth() code is from the tutorial authentication setup instructions:
https://redwoodjs.com/tutorial/authentication#web-authentication:~:text=One%20more%20touch%3A%20let's%20show%20the,about%20the%20currently%20logged%20in%20user%3A

Note, I wasn't sure if this issue belongs in the create-redwood-app or redwood repos so I added the issue in both. Please use one and close the other. Refer to redwoodjs/redwood#830

fineOne -> findUnique

Prisma is deprecating findOne() as of 2.12.0 We have several comments in generated code that mention using findOne(). We gotta update those!

The system cannot find the path specified. yarn create redwood-app not working but create-redwood-app working.

Just look at the code below. create-redwood-app is working but yarn create redwood-app is not working.

D:\redwoodjs>create-redwood-app
Please specify the project directory
  yarn create redwood-app <project-directory>

For example:
  yarn create redwood-app my-redwood-app

D:\redwoodjs>yarn create redwood-app redwood-blog
yarn create v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-redwood-app
The system cannot find the path specified.
error Command failed.
Exit code: 1
Command: C:\Users\M\AppData\Local\Yarn\Data\global\node_modules\bin\create-redwood-app
Arguments: redwood-blog
Directory: D:\redwoodjs
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.
yarn -v
1.22.5

node -v
v12.12.0

npm -v
6.11.3

It causes totally the same error with windows command console and Powershell. My system has Windows 10x64. I also use nvm. I've tried this with two node version: v12.11.1 and v12.12.0. I checked #54 (comment) out and it didn't work.

Seeds Prisma Disconnect Warning

In Primsa 2.4 introduced some changes to top level methods like disconnect:

Top-level Client Methods: $ dollar prefix for top-level Prisma Client methods
In recent versions, we introduced a couple of top-level methods in Prisma Client (e.g. prisma.transaction() and prisma.use()) in preview mode. The immediate feedback was that the denylist for model names grew - which breaks Prisma schemas where a model is called Transaction, transaction, use, or Use. And the list goes on...

In order to have a future-proof API, that allows maximum expressibility in terms of model names, we decided to prefix all non-query methods with a dollar sign $. That means Prisma Client will from now on ship with the following methods:

Pre-existing
$disconnect
$connect
$on
$queryRaw
$executeRaw

warn prisma.disconnect() is deprecated, please use prisma.$disconnect() instead

https://github.com/redwoodjs/create-redwood-app/blob/main/api/prisma/seeds.js

needs to use db.$disconnect()

Set <title> of index.html to the name of the app (last part of path)

Not sure if this is possible with yarn create but can we set the title of the app once it's copied over?

Currently the title tag for any new app is set to:

<title>`create-redwood-app`</title>

Let's make that the last part of the path that the user creates:

yarn create redwood-app Sites/superapp

Should set <title> to:

<title>superapp</title>

yarn create redwood-app fails with node incompatibility

divyendusingh [playground]$ yarn create redwood-app ./w3z                                                                                                        130 ↵
yarn create v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version "^8.9.0 || ^10.13.0". Got "12.18.2"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

Environment

OS: macOS 10.15.5
Node: 12.18.2
Yarn: 1.22.4

Using node v10.16.3 works past this issue but fails at a later validation

divyendusingh [playground]$ yarn create redwood-app ./w3z
yarn create v1.17.3
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-redwood-app
  ✔ Creating Redwood app
    ✔ Creating directory '/Users/divyendusingh/Documents/zoid/playground/w3z'
    ✔ Downloading latest release
    ✔ Extracting latest release
    ✔ Clean up
  ❯ Installing packages
    ✖ Checking node and yarn compatibility
      → yarn >=1.15.0 required, but you have 1.17.3.
      Running `yarn install`... (This could take a while)

{ Error: node >=12.0.0 required, but you have 10.16.3.
yarn >=1.15.0 required, but you have 1.17.3.
    at /Users/divyendusingh/.config/yarn/global/node_modules/create-redwood-app/dist/create-redwood-app.js:152:25
    at parallel (/Users/divyendusingh/.config/yarn/global/node_modules/check-node-version/index.js:163:5)
    at end (/Users/divyendusingh/.config/yarn/global/node_modules/run-parallel/index.js:18:15)
    at done (/Users/divyendusingh/.config/yarn/global/node_modules/run-parallel/index.js:22:10)
    at each (/Users/divyendusingh/.config/yarn/global/node_modules/run-parallel/index.js:28:7)
    at /Users/divyendusingh/.config/yarn/global/node_modules/run-parallel/index.js:38:43
    at exec (/Users/divyendusingh/.config/yarn/global/node_modules/check-node-version/index.js:201:16)
    at ChildProcess.exithandler (child_process.js:285:7)
    at ChildProcess.emit (events.js:198:13)
    at maybeClose (internal/child_process.js:982:16) context: [Object: null prototype] {} }
error Command failed.
Exit code: 1
Command: /usr/local/bin/create-redwood-app
Arguments: ./w3z
Directory: /Users/divyendusingh/Documents/zoid/playground
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

I was able to unblock myself by following the manual bootstrap process though https://community.redwoodjs.com/t/how-to-manually-bootstrap-install-create-redwood-app/115 🙌

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.