0

I’m using Windows 10 64 bit and VSCode.

package.json:

{
  "name": "shopping-list",
  "version": "1.0.0",
  "description": "shopping list desktop app",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "author": "YousefMahmoud",
  "license": "MIT",
  "dependencies": {
    "electron": "^4.0.2"
  }
}

See the screenshot of the error:

screenshot of error

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • https://stackoverflow.com/a/31976870/6330106 – ElpieKay Jan 29 '19 at 03:17
  • 1
    The contents of `package.json` that you posted – is that really the contents of the file on the disk? Are you sure you saved the file some time after adding the `start` script, rather than just changing the file in your editor without saving it? I can’t tell from the VSCode interface screenshot. – Rory O'Kane Jan 29 '19 at 03:17
  • 1
    Did you save your package.json to the disk? Or it is just in your editor? – UtillYou Jan 29 '19 at 03:19
  • I did save all files from the file window. but it shown that file Unsaved – Yousef Mahmoud Jan 29 '19 at 17:43

1 Answers1

1

When you see a filled dot in front of a file name in Visual Studio Code, that means the file is modified, but not yet saved on the disk.

Make sure to "Save All" files first, then try again your command.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I did save all files but it keeps showing this Unsaved Files, It is my first time using both VSCode and git. – Yousef Mahmoud Jan 29 '19 at 17:41
  • @YousefMahmoud Then switch to command line and check the output of `git status`. Are they untracked there? – VonC Jan 29 '19 at 19:15