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

Accessing the website using localhost:3479 throws error #11

Closed
seunex17 opened this issue Jul 19, 2022 · 14 comments
Closed

Accessing the website using localhost:3479 throws error #11

seunex17 opened this issue Jul 19, 2022 · 14 comments

Comments

@seunex17
Copy link

After running npm run dev and create a server via htpp://localhost:3479 throws error 404 page

image

@jaguarch
Copy link
Collaborator

jaguarch commented Jul 20, 2022

Hi
Open codeigniter server instead, default: http://localhost:8080

BTW, did you install node dependencies?

@seunex17
Copy link
Author

After creating a new CI4 project I then install your package and use php spark vite:init --framework svelte this then install svelte and I run npm run dev and throw above error am I missing something?

@jaguarch
Copy link
Collaborator

Yup, you didn't run php spark serve then you should open http://localhost:8080 instead.

@seunex17
Copy link
Author

The doc set run npm run dev. Well will take a look again. Well I am not seeing App.svelte in my public folder.

Will appreciate an example project to fully take a look at this.

@jaguarch
Copy link
Collaborator

Let me make it clear

  • create ci4 project composer create-project...
  • install the package composer require mihatori/codeignitervite
  • initialize it php spark vite:init --framework svelte, this command will create a resources folder in your rootpath, you will find App.svelte file there.
  • run npm install then npm run dev, this will serve vite on port 3479 but you got nothing to do with,
  • run php spark serve now open http://localhost:8080 and everything should work fine.

About the example project, is almost ready it's just a matter of day or two

@mihatorikei
Copy link
Owner

After following the installation instructions, run php spark serve and access your project through codeigniter development server wich is by default http://localhost:8080

php spark vite:init will generate a resources folder and you should find your App.svelete there

@PwrSrg
Copy link

PwrSrg commented Jul 21, 2022

I had the exact same issue, and finally just gave up.

You really need to update your documentation to make it clear that you actually need to be running TWO terminals - one running Vite, and second one running CodeIgniter at the same time.

That would have saved me a ton of time and frustration.

@mihatorikei
Copy link
Owner

Hi @PwrSrg
You're right, i'm sorry about that
i'm currently working on starter app for vue and svelte, but I would appreciate it if someone could help me with the documentation

@mihatorikei
Copy link
Owner

#13

@mihatorikei
Copy link
Owner

@seunex17
check this out https://github.com/firtadokei/ci-svelte-appstarter

@seunex17
Copy link
Author

@firtadokei perfect a very big thank you

@PwrSrg
Copy link

PwrSrg commented Jul 24, 2022

NICE! 🤩

@Gildedter
Copy link
Contributor

I run my project inside my laragon www path using nginx, then just open the v-host path on my browser (while vite is listening for changes on a separate terminal), is running spark required?

@mihatorikei
Copy link
Owner

@Gildedter nope, spark is not required

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

No branches or pull requests

5 participants