Giter VIP home page Giter VIP logo

pevey / sveltekit-vendure-starter-server-side Goto Github PK

View Code? Open in Web Editor NEW
17.0 17.0 0.0 15.68 MB

Starter project to help you create your Vendure-powered ecommerce application. This version makes requests to your Vendure backend through the SvelteKit app. For a SvelteKit starter that makes request to the Vendure backend from the client browser, see https://github.com/pevey/sveltekit-vendure-starter.

License: MIT License

TypeScript 77.97% JavaScript 0.53% HTML 0.10% CSS 0.39% Svelte 21.01%

sveltekit-vendure-starter-server-side's People

Contributors

pevey avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

sveltekit-vendure-starter-server-side's Issues

Cart icon disappears from NavBar when clicked

Hi,

Thanks for your great work! I am hoping to use it and contribute.
I ran into an issue which I have not been able to resolve unfortunately so I thought I at least check in with you if you have any ideas.

When you click on the shopping cart it disappears from the navigation bar.

I tried to troubleshoot by looking at the classes, etc. but I was not able to find the cause. The only thing I was able to confirm is that it seems to be related to lucide-svelte, I replaced the icon with another svg and the issue is not present.

I added both the ShoppingCart icon from lucide and the svg from Icones.js.org in the animation below (overlay is disabled for better visualization):

lucide-saluna

VENDURE_API_URL not defined in .env.example

Following the readme instructions I copied the example env file to .env, but in the server/vendure/index.ts file it is looking for VENDURE_API_URL which is not defined in the example env file.

So nothing loads and it took a little while to figure out why. Adding VENDURE_API_URL=http://localhost:3000/shop-api to my .env file fixed it.

$src alias not found

On running yarn vite dev after a fresh clone & install, I ran into this error:

16:28:24 [vite] Error when evaluating SSR module /src/routes/+layout.svelte: failed to import "C:/src/app.postcss"
|- Error: Failed to load url C:/src/app.postcss (resolved id: C:/src/app.postcss) in C:/Development/temp/saluna/src/routes/+layout.svelte. Does the file exist?

I traced it to the generated .sveklte-kit/tsconfig.json file that contained this:

{
	"compilerOptions": {
		"paths": {
			"$src/*": [
				"../../../../src/*"
			],
			"$lib": [
				"../src/lib"
			],
			"$lib/*": [
				"../src/lib/*"
			]
		},

I could fix this with the following change in svelte.config.js:

   kit: {
      adapter: adapter(),
      alias: {
-			'$src/*': '/src/*'
+			'$src/*': 'src/*'
		}

I'm on Windows by the way, in case that is relevant.

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.