Currently I’m trying to compile a typescript aurelia-plugin using gulp but facing the issue, that gulp can’t find the external modules stored in “node_modules”:
My Index.ts:
import { FrameworkConfiguration } from 'aurelia-framework';
import { RouteService } from './Services/ApiService';
import { ApiConfigurationInterface } from './Interfaces/ApiConfigurationInterface';
export function configure(aurelia: FrameworkConfiguration, configCallback?: (config: RouteService) => Promise<any>) {
//Some Code
}
And my gulp File:
var gulp = require("gulp");
var ts = require('gulp-typescript');
gulp.task("typescript2amd", function(){
return gulp.src('src/**/*.ts')
.pipe(ts({
noImplicitAny: true,
outFile: 'amd.js',
module: 'amd'
}))
.pipe(gulp.dest('dist/amd'));
});
gulp.task("build", [
"typescript2amd",
]);
Executing the gulp file I get the following error message:
src/index.ts(1,40): error TS2307: Cannot find module 'aurelia-framework'.
What I’m doing wrong here?