我在package.json中添加了serve关键字,并使用localhost:8080作为值,但它无法正常工作。我尝试使用本地主机ip地址而不是“本地主机”仍然出现错误。
在我的package.json上
{
"name": "package-lock",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"framework7": "^3.0.1"
},
"devDependencies": {},
"scripts": {
"serve":"localhost:8080",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}