[英]What is debug in package.json file?
I'm making a webpack manually.我正在手动制作一个 webpack。 I created a package.json file with "npm init" in an empty folder.
我在一个空文件夹中创建了一个带有“npm init”的 package.json 文件。
However, because debug is floating, I keep getting errors that I don't know in English.然而,因为调试是浮动的,我不断收到我不知道的英语错误。 Is this dubug the problem?
这是dubug的问题吗? And can you get rid of it??
你能摆脱它吗??
/////////package.json file /////////////////// enter image description here /////////package.json 文件 ///////////////////此处输入图片描述
////////error code//////////////// found 0 vulnerabilities ///////错误代码////////////// 发现0个漏洞
PS C:\\Users\\정승민\\Desktop\\제로초React마지막> npm run dev npm ERR! PS C:\\Users\\정승민\\Desktop\\제로초React마지막> npm run dev npm ERR! missing script: dev
缺少脚本:dev
npm ERR! npm 错误! A complete log of this run can be found in: npm ERR!
可以在以下位置找到此运行的完整日志:npm ERR! C:\\Users\\정승민\\AppData\\Roaming\\npm-cache_logs\\2020-09-17T15_19_19_771Z-debug.log
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.您运行了此命令,但“dev”脚本不在您的 package.json 文件中。
You can add a "dev" script by changing your package.json file to be like the example below.您可以通过将 package.json 文件更改为如下例所示来添加“开发”脚本。
{
"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!
运行
npm run dev
现在会输出: This is the "dev" script running!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.