Ask coding questions

← Back to all posts
Cant run vuejs project.
[deleted]

Hi, Could anyone help me with running the related vueJS project. It seems it errors. I honestly don't understand why. Any help would be muchly appreciated

Comments
hotnewtop
Coder100

Yeah, you forgot to add a run command!
In the root (not in the folder), add a .replit file and put:

What this will do is actually run the commands required to host the app (by default it runs index.js which is cleary nonexistent here)

[deleted]

@Coder100 Hi, Thanks. I added what you mentioned but now get the above error. See project above. What could this be? Its as if I need it to point to a replit container hostname?

[deleted]

Could you please help? @Coder100

Coder100

for more efficiency, could you care to screenshot the error instead? The project takes 10 minutes to load for me sorry @rohangroombridg

[deleted]

Sure. below is a screenshot @Coder100

Coder100

Well, it appears the host header is invalid?
Strange, is there anything that configures the use of the headers? @rohangroombridg

[deleted]

Im unsure to be honest. I assume its a replit thing [email protected]

OldWizard209

this is happening because you have a node js repl, and replit deafults to run a file named index.js, in the home folder. What you have to do is configure the run button.

You have to create a file called .replit. Make sure to name it only .replit, nothing before the .. And you have to put this code inside it:

[deleted]

@OldWizard209 Hi, Thanks. I added what you mentioned but now get the above error. See project above. What could this be? Its as if I need it to point to a replit container hostname?

[deleted]

Could you please help? @OldWizard209

OldWizard209

I can't really find a solution to this problem, so imo the best way to tackle this is to remove the folder, and just put the files in the main repl. Quickest way to do this is download a zip file, extract the file, and then put all the contents of the file into a new repl. Then name the main file index.js. Sorry for answering so late, I was busy with a couple of things. @rohangroombridg