nest icon indicating copy to clipboard operation
nest copied to clipboard

build error

Open Mark-McCracken opened this issue 9 years ago • 3 comments

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"
  ]
}

Mark-McCracken avatar May 04 '17 19:05 Mark-McCracken

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';.

Pinedo11 avatar May 04 '17 19:05 Pinedo11

That works! Thanks!

Mark-McCracken avatar May 04 '17 20:05 Mark-McCracken

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[bot] avatar Sep 25 '19 13:09 lock[bot]