Skip to content
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

Add example/nextjs-app-router #334

Merged
merged 9 commits into from
Oct 16, 2023

Conversation

bhattrajat
Copy link
Contributor

@bhattrajat bhattrajat commented Oct 15, 2023

Changes made

  • Renamed next-root-layout folder to next-app-router
  • Add stripe as a dependency for the backend API route for next-app-route example
  • created session API which handles the POST method to create checkout sessions in serverless

Issue faced

Hi @dayhaysoos I wasn't able to run any example using pnpm dev:* since It was giving me this error
image
and this warning as well
image
I think this is related to the last commit and maybe missing dependency of date-fns?
So I have commented last committed code just to get pass the git commit.
Can you please take a look into this and my PR as well?

@netlify
Copy link

netlify bot commented Oct 15, 2023

👷 Deploy request for useshoppingcart pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d4c6df4

@dayhaysoos
Copy link
Owner

Whoa, thank you! I really appreciate you. I'm gonna take a look tomorrow morning if that's okay with you 🫡

@dayhaysoos
Copy link
Owner

Hey @bhattrajat, I sent a PR to your fork bc I did a whole bunch of messy stuff. Lemme know if it works though, maybe we can move forward from there. You should be able to run the project now and not see any dependency errors

@@ -1,5 +1,6 @@
import { isClient } from '../utilities/SSR'
import { formatISO } from 'date-fns'
// This is giving an error if I run any dev: script using pnpm
// import { formatISO } from 'date-fns'
Copy link
Contributor Author

@bhattrajat bhattrajat Oct 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @dayhaysoos, Thanks for your commit in the fork. It fixed the error in nextjs project but since I have commented import here so I can commit my code since pre commit hook is giving me an error. I need to uncomment it before merging this PR. But if I uncomment this code and try to commit it, It is not working due to pre-commit hook which is giving me this error.
image

@bhattrajat
Copy link
Contributor Author

Hi, Now I am able to run the nextjs project without any error but if I try to revert back the commented code in use-shopping-cart\core\Entry.js
It is not letting me due to an error. Can you please check?

@dayhaysoos
Copy link
Owner

@bhattrajat I just realized that date-fns isn't even in the package.json.

Does it work after you install it yourself with this command?

pnpm --filter use-shopping-cart add date-fns

@bhattrajat
Copy link
Contributor Author

Yes, It works 🥳. Also, I have checked all the svgs are working fine in nextjs-app-router example. Let me know if you have any suggestions/improvements.

@dayhaysoos
Copy link
Owner

Thank you @bhattrajat, I'm going to go ahead and merge. Honestly I have to work on the new timestamp feature that I have in another branch so I have to play catch up before I give any feedback on improvements/suggestions for now. I really appreciate you!

@all-contributors please add @bhattrajat for examples

@allcontributors
Copy link
Contributor

@dayhaysoos

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

I've put up a pull request to add @bhattrajat! 🎉

@dayhaysoos dayhaysoos merged commit 46d1e87 into dayhaysoos:master Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants