惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Cisco Talos Blog
Cisco Talos Blog
C
Check Point Blog
博客园_首页
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Martin Fowler
Martin Fowler
Recorded Future
Recorded Future
S
Security @ Cisco Blogs
L
LINUX DO - 最新话题
博客园 - 司徒正美
P
Privacy International News Feed
G
Google Developers Blog
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
K
Kaspersky official blog
I
InfoQ
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
Webroot Blog
Webroot Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
D
Docker
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Microsoft Azure Blog
Microsoft Azure Blog
Spread Privacy
Spread Privacy
量子位
H
Hacker News: Front Page
Simon Willison's Weblog
Simon Willison's Weblog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
SecWiki News
SecWiki News
S
Security Affairs
Latest news
Latest news
人人都是产品经理
人人都是产品经理
C
CERT Recently Published Vulnerability Notes
S
Security Archives - TechRepublic
V
Visual Studio Blog
T
Troy Hunt's Blog
S
Secure Thoughts
F
Fortinet All Blogs
V
V2EX
The Register - Security
The Register - Security
J
Java Code Geeks
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

博客园 - 望穿秋水

EF表查询列表只查询其中几列的写法 Vue 设置为history模式之后,刷新页面报404错误的解决办法 前端页面部署之后刷新页面之后出现HTTP 错误 404.0 - Not Found错误问题解决 大数据开发规范 IIS中SSL证书过期更新的问题 .NET安装运行环境及IIS网站部署相关问题汇总 SSAS问题汇总 [MSSQL]开启/关闭Ad Hoc Distributed Queries组件 sqlserver安装之后,SSMS远程连接连接不上的问题解决:请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接 数据治理包括哪些方面 VUE hash路由和history路由的区别 WinForm的EXE破解(基于IL修改)【转】 C# 反编译破解软件方法【转】 TortoiseGit提交每次都需要输入账号密码的解决办法 spark mllib算法思想总结[转] MLlib算法简介 VS2019 Git连接源代码报错问题:cannot spawn askpass: No such file or directory could not read Username for ‘https://github.com‘: terminal prompts disabled 永久关闭Windows10自动更新 [转]人生就是不断试错的经历,只有见过最糟的经历,才能学会享受美好
vue项目启动报错 spawn cmd ENOENT errno
望穿秋水 · 2021-10-31 · via 博客园 - 望穿秋水

START

  • 运行vue项目(npm run dev)报错
  • 报错如下
DONE  Compiled successfully in 11178ms                                                                      下午3:42:04


  App running at:
  - Local:   http://localhost:8080/
  - Network: unavailable

  Note that the development build is not optimized.
  To create a production build, run npm run build.

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn cmd',
  path: 'cmd',
  spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:8080/' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app@0.1.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app@0.1.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\node\node_cache\_logs\2020-12-19T07_42_04_693Z-debug.log

解决

  • 原因: 电脑缺少cmd运行程序的环境变量
  • 解决方法

环境变量配置图解.png

END

  • 可以总结一下啊 spawn xxx ENOENT 其实就是缺少,对应的运行程序的环境变量(系统环境变量中Path中添加C:\Windows\System32)。