Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #23

Closed
Mark-McCracken opened this issue May 4, 2017 · 3 comments
Closed

build error #23

Mark-McCracken opened this issue May 4, 2017 · 3 comments

Comments

@Mark-McCracken
Copy link

Compiling the project results in
screen shot 2017-05-04 at 20 31 17
this error.

This seems to stem from the express_1.default(); line. Removing .default seems to resolve this issue.

Here's my tsconfig for reference
tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "",
    "module": "commonjs",
    "mapRoot": "./",
    "outDir": "../server-dist",
    "declaration": false,
    "noImplicitAny": false,
    "noLib": false,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": ["es2016"],
    "target": "es6",
    "sourceMap": true,
    "allowJs": true
  },
  "exclude": [
    "node_modules"
  ]
}
@Pinedo11
Copy link

Pinedo11 commented May 4, 2017

Hey!
Bearing in mind that you have followed the official documentation try this:

In index.ts change:
import express from 'express';
for:
import * as express from 'express';.

@Mark-McCracken
Copy link
Author

That works!
Thanks!

@lock
Copy link

lock bot commented Sep 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants