【问题标题】:Angular2 Socket IssueAngular2 套接字问题
【发布时间】:2017-04-21 01:18:41
【问题描述】:

嗨,我在 Angular 2 中处理 Socket.io 时遇到了错误

import * as io from "socket.io-client";

一切都很好,直到现在当我加载项目时,我可以看到以下错误

(index):18 错误: (SystemJS) XHR 错误 (404 Not Found) 正在加载 http://localhost:1000/socket.io-client

请帮帮我

【问题讨论】:

    标签: node.js angular typescript socket.io


    【解决方案1】:

    使用npm install @types/socket.io-client --save

    查看https://github.com/angular/angular-cli/issues/1278了解更多信息

    【讨论】:

    • 抱歉没用
    猜你喜欢
    • 2017-04-15
    • 2011-01-03
    • 2010-12-19
    • 2011-06-17
    • 2011-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多