Configure package.json file

HI everyone

I have install nodejs now i want configure the json file but someting is going wrong I really following the srep on the course

what I have

can i have help about what is going wrong here ,

thanks

You’re missing a comma here, your best bet is to follow the installation instructions of three.js

The package.json file is set up automatically when using option 1 with vite

thanks for the link

when I run
npm run dev

I have the message “missing script dev”
I add it package.json file I have

This is not related to three.js.

your “dev”: “vite” and “build”: “vite build” are outside the “scripts { }” block
it should be

"scripts": {
    "dev": "vite",
    "build": "vite build"
}

And whatever that test line, if you need it (it does nothing right now).
Don’t mess in that file unless you know what you are doing, it will cause problems.

Also, you haven’t saved package.json, the vscode shows the white circle that means the open file have changes but not saved yet. Ctrl+S is the hotkey to save the current file.

cd ../ into your “my server” folder, run “npm create vite”, give your new project directory a name “web-new”, follow the setup instructions selecting the options you wish to use, cd into “web-new” run “npm install” and start from there, the correct package.json is setup automatically.