Having trouble running plasmic-host
when visiting
<http://localhost:3000/plasmic-host>
I see the correct page
hi @still_peacock! what do you see if you open http://localhost:3000/plasmic-host directly in your browser?
do you see any error messages in the console or in the network tab when you open your project?
hmmm these don’t seem to be related… can you check the “networks” tab to see if it fails to load you r /plasmic-host
page?
Also can you try console.log
something when opening this page?
like:
<Route path="/plasmic-host" element={<PlasmicHostPage />}
with:
function PlasmicHostPage() {
console.log("### loaded! ###");
return <PlasmicCanvasHost />
}
not getting “loaded!” logged
when opening plasmic studio
oh, looks like a CORS error - can you try adding Access-Control-Allow-Origin: *
response header to this page?
I usually deal with cors errors on my node server
but this has nothing to do with my node server
not sure how to add this to the header of a specific page
I’ve added
app.get('/plasmic-host', (req, res) => {
res.setHeader('Access-Control-Allow-Origin', '*');
});
to the server.js file of my node server → that did not do the trick
hi @still_peacock can you check the response headers in the network tab when you open http://localhost:3000/plasmic-host directly in your browser? you can also quickly check it running fetch("<http://localhost:3000/plasmic-host>")
in the console (it should fail when running it from Studio while the issue is not fix, but it should always work when running it from plasmic-host/
directly)