-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next example doesn't build #71
Comments
Hi @hyperknot Please check if you have done the following:
note: you do not need to run |
I'm using pnpm, I haven't invested into how to make it work with Lerna. But aren't the examples supposed to be "self-sufficient" that is, they can be moved outside the repo and work on their own? For example Next.js has over 300 examples, and all of them are working independently. |
You can use normal The examples are linked to the latest elements build, which exists through the Lerna build process. This makes it easy for us to test and maintain within the same repository. You can of course move the nextjs example outside of this repositories scope and just install the missing packages manually. There shouldn't be that many since the examples are also quite lean. To understand how this works inside of the elements repository, see here https://github.com/ory/elements/blob/main/examples/nextjs-spa/package.json#L17 We also documented this inside the readme https://github.com/ory/elements#contributing and https://github.com/ory/elements#understanding-ory-elements |
I understand. It's an easy fix anyway, just 2-3 packages installed is no big deal. Do you know why is the TS error? Is it related to something with lerna or build also throws this on your side? |
I don't get any ts errors 😕 I would recommend you delete the node_modules folder and reinstall the packages. Below commands should do the trick:
you can replace |
unless you copied out the nextjs example and don't have eslint setup correctly 🤔 |
It works with the lerna steps, no error. But are these using non-standard ESLint configurations? I mean I guess every user who encounters this repository will want to run / copy these into their personal projects. For example the Next.js one should compile with the standard ESLint coming from create-next-app, otherwise it'd be a lot of effort just to try to make it run. |
I went through and integrated Ory Elements into my Next.js project. The example is basically copy-pasted, except for these errors, which all have to be I believe the Next.js setup is more strict then what you are using for developments. For a nicer DX I'd recommend using the same settings as Next.js so that users don't have to manually @ts-ignore them. As an alternative, having a higher level wrapper for |
Thank you for the feedback! I will take a look in the coming days on how we can improve this |
Preflight checklist
Describe the bug
build throws the following errors:
There might be more TS errors, it stops at the first one.
Reproducing the bug
run build
Relevant log output
No response
Relevant configuration
No response
Version
master
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response
The text was updated successfully, but these errors were encountered: