moizKachwala/Angular2-express-mongoose-gulp-node-typescript

Failed to load external modules

davidRsully opened this issue · 3 comments

Some errors when running:
[1] Failed to load external module ts-node/register
[1] [08:10:48] Failed to load external module typescript-node/register
[1] [08:10:48] Failed to load external module typescript-register
[1] [08:10:48] Failed to load external module typescript-require

check this package.json and add them, after that npm install:

"devDependencies": {
"@types/core-js": "^0.9.32",
"concurrently": "^2.2.0",
"morgan": "1.7.0",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-nodemon": "^2.1.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-tslint": "^4.3.3",
"gulp-typescript": "^2.13.6",
"gulp-typings": "^2.0.0",
"method-override": "^2.3.6",
"run-sequence": "^1.2.1",
"tslint": "^3.5.0",
"ts-node": "1.3.0",
"typescript-register": "1.1.0",
"typescript": "^1.8.10",
"typings": "^1.3.2"
},

This did the trick, thanks so much. I added
"ts-node": "1.3.0",
And everything is running without those errors.

I also changed line 9 of the package.json file from:
"start": "concurrent --kill-others "gulp watch" "gulp start\”",
To:
"start": "concurrently --kill-others "gulp watch" "gulp start"",

I was looking for a way to get the data returned sorted, and so on line 25 of the BaseRepositoriy.ts I added the following.

retrieve (callback: (error: any, result: any) => void) {
    this._model.find({}, callback).sort({name: 1})
}

This works well enough, but do you know of a way to make it a dynamic param?

David Sullivan
David.R.Sully@Gmail.com

On Sep 3, 2016, at 8:28 AM, Elio Suárez Santana notifications@github.com wrote:

check this package.json and add them, after that npm install:

{
"email": "AskPam-web",
"version": "1.0.0",
"description": "Askpam Web holds landing page + admin for users",
"scripts": {
"clean": "gulp clean",
"compile": "gulp compile",
"build": "gulp build",
"start": "concurrent --kill-others "gulp watch" "gulp start"",
"postinstall": "gulp installTypings",
"test": "echo "Error: no test specified" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/SamuelTassell/AskPam-Web/"
},
"keywords": [
"Angular2",
"Express",
"Quick Start",
"Gulp",
"Typescript",
"AskPam"
],
"author": "AskPam",
"license": "MIT",
"dependencies": {
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/compiler-cli": "0.5.0",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/platform-server": "^2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.5",
"angular2-in-memory-web-api": "0.0.17",
"body-parser": "^1.15.1",
"bootstrap": "^3.3.6",
"core-js": "^2.4.0",
"express": "^4.13.4",
"mongoose": "^4.5.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
"@types/core-js": "^0.9.32",
"concurrently": "^2.2.0",
"morgan": "1.7.0",
"del": "^2.2.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-nodemon": "^2.1.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-tslint": "^4.3.3",
"gulp-typescript": "^2.13.6",
"gulp-typings": "^2.0.0",
"method-override": "^2.3.6",
"run-sequence": "^1.2.1",
"tslint": "^3.5.0",
"ts-node": "1.3.0",
"typescript-register": "1.1.0",
"typescript": "^1.8.10",
"typings": "^1.3.2"
},
"homepage": "
https://github.com/SamuelTassell/AskPam-Web/tree/master#readme"
}

2016-09-03 15:13 GMT+01:00 davidRsully notifications@github.com:

Some errors when running:
[1] Failed to load external module ts-node/register
[1] [08:10:48] Failed to load external module typescript-node/register
[1] [08:10:48] Failed to load external module typescript-register
[1] [08:10:48] Failed to load external module typescript-require


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#8,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKU3ikwadgCk6KiMRKtM8pgQfUjzi_mDks5qmYCagaJpZM4J0T7q
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #8 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/ALn9TEfrne-pMzvEuBIpSefykB9XU7c5ks5qmYQngaJpZM4J0T7q.

I will add the "ts-node": "1.3.0", in the dev dependency and close this issue.