我正在尝试在Mac中使用WebStorm创建Vue应用。当我运行 /*
* To change this license header, choose License Headers in Project Properties.
package es1;
import javafx.event.ActionEvent;
javafx.event.EventHandler;
import javafx.scene.control.TextField;
/**
*
* @author DAVIDE
*/
public class Textfield extends TextField implements EventHandler<ActionEvent> {
@Override
public void handle(ActionEvent event) {
this.appendText(event.getSource().toString());
}
}
时出现此错误:
npm错误!缺少脚本:dev
这是我的package.json:
npm run dev
答案 0 :(得分:4)
那是因为您的dev
中没有package.json
脚本。您应该执行npm run serve
。可用的脚本如下
// ...
"scripts": {
"serve": "vue-cli-service serve", // npm run serve
"build": "vue-cli-service build", // npm run build
"lint": "vue-cli-service lint" // npm run lint
},
// ...