无法将mssql导入Angular 2项目

时间:2017-01-31 14:32:53

标签: sql-server node.js angular npm

我通过mssql安装了@types/mssqlnpm,并将我的systemjs.config更改为:

System.config({
    paths: {
        // alias
        'npm:': 'node_modules/',
    },
    map: {
        app: 'app',
        ...
        'mssql': 'npm:mssql'
    },
    packages: {
        app: {
            main: './main.js',
            defaultExtension: 'js'
        },
        ...
        mssql: {
            main: 'index.js',
            defaultExtension: 'js'
        }
    }
});

当我添加像

这样的导入语句时
import * as mssql from "mssql"

我收到以下错误:

"http://localhost:3000/util" Failed to load resource: the server responded with a status of 404 (Not Found)
"http://localhost:3000/promise" Failed to load resource: the server responded with a status of 404 (Not Found)
"http://localhost:3000/fs" Failed to load resource: the server responded with a status of 404 (Not Found)
"http://localhost:3000/events" Failed to load resource: the server responded with a status of 404 (Not Found)
"http://localhost:3000/url" Failed to load resource: the server responded with a status of 404 (Not Found)
"http://localhost:3000/querystring" Failed to load resource: the server responded with a status of 404 (Not Found)

我做错了什么?

0 个答案:

没有答案