Hi, I am not a technical person at all and coding is not my industry. I am trying to add some code to my site so my welcome page transitions automatically after 10 seconds to my home page. I found that code online with many people saying that it worked for them. However when I tried to do the same… mine obviously bugged with 2 error messages:
For import “An import declaration can only be used in a namespace or module.”
and
For the location “Cannot find module ‘/wipwelcome’ or its corresponding type declarations.”
Any chance anyone can help (in a very simply way as I am no expert at all!)
Hi J.D. Thank you so much! The firt issue has been resolved!
However, it seems like I still do not insert the right path, location, link… the same errors still shows up. See the three screenshots below…
Any clue of what could fix this?
change the import statement at the top to the following:
import wixLocation from "wix-location"
The wixLocation import is a part of the built in wix module. You only declare the page you want to navigate to when calling the wixLocation.to(). Not when originally importing wixLocation at the top of the page. Hope that helps
Also here is the relevant velo docs: Introduction - Velo API Reference - Wix.com