#Visual Studio Start up

1 messages · Page 1 of 1 (latest)

hidden bluff
#

Hello, i'm having a few issues with mvs where it asks me to pick "a valid startup item" i've tried everything but it doesn't change anything, could someone help?

silver lagoon
#

Why are you using visual studio for js

hidden bluff
silver lagoon
#

That’s not what ides are for

#

At least use vscode lol. Even that is terrible

#

If you can avoid Microsoft you should

hidden bluff
#

What should I do to start it?

obsidian vector
obsidian vector
#

to OP: you are developing a node.js app, right?
then select the node index.js option.

#

alternatively you could open a command line in the folder you have the project and then write the node index.js command in there

hidden bluff
#

I’ll try again

obsidian vector
#

oh. I haven't used visual studio for JS myself, I'm always using VSC, so I'm kinda guessing

hidden bluff
#

yea i'm stuck at the moment and don't know what to do

silver lagoon
#

Reinstall npm

#

Like in the project

#

Delete package lock and then reinstall

#

If that doesn’t work idk

hidden bluff
#

how do i do that?

silver lagoon
#

Delete package-lock.json

#

Then do npm i in terminal

hidden bluff
#

it doesn't work, well i don't know what to do then 😅

#

i'm going to try and move everything to Repl.it and see if that might work, but tbh i don't know

silver lagoon
#

What are you coding?

hidden bluff
#

I'm trying to make a simple ticket bot for my server

#

but as you can see it isn't going as planned 😅

toxic nimbus
#

I think instead of worrying about the startup option thing, you could just open a console and run the node command in that

#

it doesn't help fix the problem but it does help you keep going with creating your bot

#

also I haven't used visual studio before since I use visual studio code as it feels more user friendly to me

silver lagoon
#

Vim+ users don’t have this issue

hidden bluff
#

i tried it in repl.it and the issue i'm getting now is an ERROR

silver lagoon
toxic nimbus
#

what does your package.json look like?

silver lagoon
#

A lot of replit servers get ip banned

toxic nimbus
#

it might be missing the scripts field

silver lagoon
#

By discord

paper quartz
#

@silver lagoon If you're just going to complain literally do it anywhere but here people are trying to be helpful and you're talking to yourself

silver lagoon
#

Make sure scripts in package.json looks like this json "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node ." }, index.js should be the main file and in the same directory

silver lagoon
hidden bluff
paper quartz
paper quartz
#

Even if the file is small it's a good habit to get into when your files become.. not small.

silver lagoon
hidden bluff
toxic nimbus
#

ok so yeah you're missing the start script

silver lagoon
hidden bluff
silver lagoon
toxic nimbus
#

well really you should just add the start script from that since you have other scripts already in place

silver lagoon
#

Well not necessary but

toxic nimbus
#

yeah that's what I meant by saying they have the other scripts already in their file

silver lagoon
#

It won’t tell you the error without it

#

Yeah I just don’t want op to replace all the scripts with start

#

Could be confusing

hidden bluff
silver lagoon
#

Just Add "start": "node ." to scripts section
Also make sure to put a comma after the script before

hidden bluff
#

ahh so like that

silver lagoon
#

No

silver lagoon
#

Delete all of scripts and just replace it with that

hidden bluff
#

alright i think i got it

silver lagoon
#

Ok

hidden bluff
#

i replaced all of it

#

thanks, i appreciate the help (: