Giter Club home page Giter Club logo

Comments (7)

khalwat avatar khalwat commented on August 12, 2024

If it can't connect to localhost on port 3000 that sounds to me like some kind of a local dev issue? What host & port is the Vite dev server actually running off of?

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

I'm pretty sure the [an error occurred while processing the directive] may not have anything to do with the plugin? Could it be an Nginx error, where it's trying to use SSI but SSI is not enabled in the Nginx config?

from craft-vite.

jamiematrix avatar jamiematrix commented on August 12, 2024

As far I as I can see we've followed the installation instructions to get the plugin setup. Majority of the team are using DDEV if that makes a difference (I've made sure those extra DDEV specific steps are in there for the DDEV config).

Most of my assumption it's the plugin is this is the first time we've used the plugin and the site wasn't showing the error before. Initially I thought it wasn't the plugin as I disabled it in /admin but the error remained.

devServerInternal in the config is set to http://localhost:3000
server.origin is set to http://localhost:3000 and server.port is set to 3000 in vite.config.js

from craft-vite.

jamiematrix avatar jamiematrix commented on August 12, 2024

Not sure why it wasn't showing before but now the browser console is listing web socket errors connecting to the DDEV site URL and localhost (both port 3000).

I'll go through the config again to check it over

from craft-vite.

jamiematrix avatar jamiematrix commented on August 12, 2024

I've set devServerInternal to use https and now those web socket errors have gone. Still get the [an error occurred... message though

from craft-vite.

jamiematrix avatar jamiematrix commented on August 12, 2024

Think we found the issue.

We've been using your template scaffolding for some of our newer sites and it looks like the critical-css (https://github.com/nystudio107/craft/blob/craft-vite/cms/templates/_boilerplate/_partials/critical-css.twig) file was causing the problem.

We're using NGINX with DDEV so it's trying to load the critical css (which isn't in place). Not sure why this site is getting the error and no other site is with DDEV (I changed to DDEV when Nitro was 'dropped').

from craft-vite.

khalwat avatar khalwat commented on August 12, 2024

Cool, yep, that's what I figured it would be.

from craft-vite.

Related Issues (20)

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.