1

I'm making a webpack manually. I created a package.json file with "npm init" in an empty folder.

However, because debug is floating, I keep getting errors that I don't know in English. Is this dubug the problem? And can you get rid of it??

/////////package.json file /////////////////// enter image description here

////////error code//////////////// found 0 vulnerabilities

PS C:\Users\정승민\Desktop\제로초React마지막> npm run dev npm ERR! missing script: dev

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\정승민\AppData\Roaming\npm-cache_logs\2020-09-17T15_19_19_771Z-debug.log

Oh, and no one is helping me because I was first asking a question. Please let me know if you have any problems.

NaNaruto
  • 51
  • 1
  • 4

2 Answers2

1

I think it happens because of two reasons,first you should go to this path C:\Users(your name of system)\AppData\Roaming\npm and clear npm and npm-cache,if it doesn't work please go to Control Panel>System and Security>System>Advance system setting>Enviroment variable and set system variables path C:\Windows\System32\ variable and restart your System and then try it.

Negin msr
  • 113
  • 9
  • Thank you for your response. As a question, how do I know if there are a lot of files, but they are cache files? – NaNaruto Sep 17 '20 at 17:21
  • please check here for more detail:https://stackoverflow.com/questions/31976722/start-script-missing-error-when-running-npm-start – Negin msr Sep 17 '20 at 17:34
1
npm run dev

You ran this command, but the "dev" script is not in your package.json file.

You can add a "dev" script by changing your package.json file to be like the example below.

{
  "name": "lecture",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "echo This is the \"dev\" script running!",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "min",
  "license": "MIT"
}

Running npm run dev will now output: This is the "dev" script running!

Ionaru
  • 982
  • 3
  • 13
  • 23