首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >由于ERR_ASSERTION,vue创建失败

由于ERR_ASSERTION,vue创建失败
EN

Stack Overflow用户
提问于 2021-02-02 16:23:18
回答 1查看 61关注 0票数 0

运行vue create my-project失败,错误为

代码语言:javascript
复制
assert.js:92
  throw new AssertionError(obj);
  ^

AssertionError [ERR_ASSERTION]: 293 == 0
    at ClientRequest.onConnect (C:\Users\myname\.node_modules_global\node_modules\@vue\cli\node_modules\tunnel-agent\index.js:160:14)
    at Object.onceWrapper (events.js:313:26)
    at ClientRequest.emit (events.js:223:5)
    at Socket.socketOnData (_http_client.js:490:11)
    at Socket.emit (events.js:223:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:290:11)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:181:23) {
  generatedMessage: true,
  code: 'ERR_ASSERTION',
  actual: 293,
  expected: 0,
  operator: '=='
}

而node & npm安装可以正常运行。我在公司代理背后,我的版本是

@vue/cli 4.5.11

节点v12.14.1

npm 6.14.8

我可以毫无问题地ping https://registry.npmjs.org/。怎么了?

EN

回答 1

Stack Overflow用户

发布于 2021-02-03 17:04:41

我通过npm install -g @vue/cli@5.0.0-alpha.3安装了vue cli 5.0.0-alpha.3修复了这个问题。

它要求更改为TaobaoRegistry,因为https://registry.npmjs.org/似乎很慢。也许目前的稳定不包括这一点。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66005980

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档