nest
nest copied to clipboard
build error
Compiling the project results in
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"
]
}
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';.
That works! Thanks!
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.