npm - 电子应用程序不会运行。不知道为什么
问题描述
当输入 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"
}
请帮忙。
解决方案
您需要首先安装所有依赖项。尝试执行
npm install
首先在您的项目目录中。安装依赖项后,您可以执行
npm start
这将启动您的电子应用程序。
推荐阅读
- authentication - 路由“/authentication/login”如何连接到“_LoginPartial.cshtml”?
- java - 从 Linux 命令行启动 Spring Boot Web 应用程序
- mysql - 通过node.js将汉字插入MySQL
- buffer - Informatica 中的缓冲区长度与列精度与 DTM 缓冲区大小
- ruby-on-rails - Rails:对教程如何在方法中调用行项目对象感到困惑
- python - 如何仅提取与熊猫中特定列对应的行的第一次出现
- python - 如何将查询的语法从mysql转换为sqlite3
- c - 每当我使用此代码将一个文件的内容复制到另一个文件时,最后一个字符总是被复制两次。请帮我找出错误
- javascript - 从 Web 打印到 Epson LX 310 - 调整字体大小和类型以及正确的纸张大小
- flutter - Flutter/ Django REST API 调用