javascript - 创建一个新的 Angular 项目
问题描述
我试图创建一个新的 Angular 项目,但我收到了这个错误。我也安装了一个更新的节点。
- Installing packages...
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/socket.io-adapter failed, reason: connect ETIMEDOUT 104.16.23.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! Unexpected end of JSON input while parsing near '...\r\n-----END PGP SIGN'
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AUGUST\AppData\Roaming\npm-cache\_logs\2020-08-13T07_26_40_996Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.
解决方案
你在用ng new
吗?你的 是什么ng --version
,你确定你也是最新的 Angular CLI 吗?(此外,您应该至少使用 Node LTS 版本(目前为 12.18),请检查node -v
)。
另外,尝试清理缓存:
npm cache clean --force
然后再次尝试该命令。
推荐阅读
- javascript - 当窗口调整大小或在角度 6 中失去焦点时,如何防止重新渲染
- node.js - 嵌套关系包含在使用节点 js 的 Sequelize 中
- r - 构建包时仅将特定变量传递给闪亮的应用程序
- oracle - SQL QUERY 与组合
- python-3.x - 通过 python3 在 Elasticsearch 中索引 HTML
- javascript - 数据表上的范围日期搜索 (CodeIgniter)
- typescript - Create-react-app 2.1.1:Sass 并没有真正加载
- mysql - 单个 MySQL 查询返回不同的分类平均值
- c++ - 将阻塞函数与信号一起使用(QTcpSocket)
- reactjs - Axios “取消” api 调用