Giter VIP home page Giter VIP logo

sveltekit-medusa-starter's People

Contributors

brussli1 avatar pevey 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  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  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

sveltekit-medusa-starter's Issues

Cannot read properties of undefined (reading 'total')

After setting up my medusajs backend and configuring environment variables, I am able to implement products from the backend and add them to the cart. However, when I click "checkout" from the cart, and the checkout page loads, I get the message "your cart is empty" even after adding items to the cart. My terminal throws a TypeError:

{
id: 'u8IbOL8OTM6n96FJ5d9sX',
type: 'response',
timestamp: '2023-12-24T07:39:55.142Z',
url: 'http://localhost:9000/store/carts/cart_01HJDBBVCN2GBPS5ZW5XRWS6PE/payment-session',
status: 400,
statusText: 'Bad Request'
}
TypeError: Cannot read properties of undefined (reading 'total')
at POST (M:\storefront\src\routes\checkout\turnstile+server.ts:18:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Module.render_endpoint (M:\storefront\node_modules@sveltejs\kit\src\runtime\server\endpoint.js:43:18)
at async resolve (M:\storefront\node_modules@sveltejs\kit\src\runtime\server\respond.js:404:17)
at async Object.handle (M:\storefront\src\hooks.server.ts:10:21)
at async Module.respond (M:\storefront\node_modules@sveltejs\kit\src\runtime\server\respond.js:274:20)
at async file:///M:/storefront/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:510:22

I get these same results both before and after adding Stripe to my app.

Any Ideas? Thank you!

Type error every time trying to make a payment with Stripe

After setting up all my environment variables, everything is working correctly(turnstile, address autocompletion, stripe loading)

Only the payments fail although they show up in Stripe Dashboard as "incomplete"

This is the error in the console:

Screenshot 2023-11-21 at 07 34 25@2x

Something seems to be broken in this function but I can't tell what:

 // confirm payment
	const stripeResponse = await $stripeClient.confirmPayment({ elements: $stripeElements, redirect: 'if_required' })
		if (stripeResponse.error) {
			errorMessage = stripeResponse.error.message
            processing = false
            cancel()
		} else {
			return async ({ result }) => {
				if (result.status === 200) {
					success = true
					order = result.data.order
				} 
			}
	}
               

Any ideas?

yarn build/run fails with

Thanks for the tutorial!

Following along with the video from SS and 'yarn dev' fails due to the alias config being commented:

// alias: {
// '$src/*': '/src/*'
// },

Error: [vite]: Rollup failed to resolve import "$src/app.postcss" from "/Users/ira/repos/sveltekit-medusa-starter/src/routes/+layout.svelte".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`

Uncommenting the line fixes the bug

TypeError when adding an item to Cart

{
id: 'awZtmm4DT9WC7ikp9JKGB',
type: 'response',
timestamp: '2023-10-17T08:44:49.794Z',
url: 'http://localhost:9000/store/carts',
status: 400,
statusText: 'Bad Request'
}
TypeError: Cannot read properties of undefined (reading 'id')
at MedusaClient.addToCart (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/node_modules/sveltekit-medusa-client/dist/index.js:338:36)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async add (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/src/routes/cart/+page.server.ts:9:18)
at async Module.handle_action_json_request (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/node_modules/@sveltejs/kit/src/runtime/server/page/actions.js:57:16)
at async resolve (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/node_modules/@sveltejs/kit/src/runtime/server/respond.js:415:18)
at async Object.handle (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/src/hooks.server.ts:7:20)
at async Module.respond (C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/node_modules/@sveltejs/kit/src/runtime/server/respond.js:282:20)
at async file:///C:/Users/kenne/sveltekit/sveltekit-medusa-starter-main/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:506:22

Unable to clone project to local

I tried cloning and encountered 'Please make sure you have the correct access rights and the repository exists' (see attached image)
This looks like an interesting starter kit, do I need to subscribe or logon to test this out?
clone-error

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.