电子应用程序将无法运行。无法弄清楚为什么

时间:2020-05-17 12:59:22

标签: npm electron

在键入npm start时,出现此错误:

npm ERR! errno 1
npm ERR! helloworld@1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the helloworld@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

这是package.json

{
  "name": "helloworld",
  "version": "1.0.0",
  "description": "my app",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  },
  "author": "kamalyaka",
  "license": "MIT"
}

请帮助。

1 个答案:

答案 0 :(得分:0)

您需要首先安装所有依赖项。 尝试执行

public void removeItem(int position){
    eventList.remove(position)
    notifyItemRemoved(position)
}

首先在您的项目目录中。 安装依赖项后,您可以执行

npm install

这将启动您的电子应用程序。