简体   繁体   中英

What is debug in package.json file?

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.

我认为它的发生有两个原因,首先你应该去这个路径 C:\\Users(你的系统名称)\\AppData\\Roaming\\npm 并清除 npm 和 npm-cache,如果它不起作用请转到 Control面板>系统和安全>系统>高级系统设置>环境变量并设置系统变量路径C:\\Windows\\System32\\变量并重新启动系统然后尝试。

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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM