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

watch:test doesn't work #424

Closed
alvipeo opened this issue Mar 15, 2016 · 4 comments
Closed

watch:test doesn't work #424

alvipeo opened this issue Mar 15, 2016 · 4 comments

Comments

@alvipeo
Copy link

alvipeo commented Mar 15, 2016

I use 'npm run watch:test' and when it initially starts all tests run. When I change the file with a test and save it, nothing happens. So it doesn't react on code changes. It used to work before.

@alvipeo
Copy link
Author

alvipeo commented Mar 15, 2016

Update - this is what I get in about 10 sec:

<--- Last few GCs --->

96789 ms: Mark-sweep 1378.6 (1456.9) -> 1378.5 (1456.9) MB, 935.2 / 0 ms [allocation failure] [GC in old space requested].
97663 ms: Mark-sweep 1378.5 (1456.9) -> 1378.5 (1456.9) MB, 874.4 / 0 ms [allocation failure] [GC in old space requested].
98541 ms: Mark-sweep 1378.5 (1456.9) -> 1377.2 (1456.9) MB, 877.8 / 0 ms [last resort gc].
99412 ms: Mark-sweep 1377.2 (1456.9) -> 1378.5 (1456.9) MB, 871.3 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 00000027931E3AD1
1: getUnionType(aka getUnionType) [d:\Documents\Visual Studio 2015\Projects\UniGalleryCode\node_modules\typescript\lib\typescript.js:18963] [pc=000003B29B11798D](this=0000002793104189 ,types=00000100D5004309 <JS Array[2]>,noSubtypeReduction=0000002793104231 <true)
2: instantiateType(aka instantiateType) [d:\Documents\Visual Studio 2015\Projects\UniGalleryCode\node_modules...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "test" "--" "--auto-watch" "--no-single-run"
npm ERR! node v5.8.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 test: karma start "--auto-watch" "--no-single-run"
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 test script 'karma start "--auto-watch" "--no-single-run"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! karma start "--auto-watch" "--no-single-run"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! d:\Documents\Visual Studio 2015\Projects\UniGalleryCode\npm-debug.log

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "watch:test"
npm ERR! node v5.8.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! angular2-webpack-starter@3.0.0 watch:test: npm run test -- --auto-watch --no-single-run
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular2-webpack-starter@3.0.0 watch:test script 'npm run test -- --auto-watch --no-single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-webpack-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run test -- --auto-watch --no-single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-webpack-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-webpack-starter
npm ERR! There is likely additional logging output above.

@alvipeo
Copy link
Author

alvipeo commented Mar 15, 2016

ok, I used latest packages and it seems like it all works now!

{
  "name": "angular2-webpack-starter",
  "version": "3.0.0",
  "description": "An Angular 2 Webpack Starter kit featuring Angular 2 (Router, Http, Forms, Services, Tests, E2E, Coverage), Karma, Protractor, Jasmine, Istanbul, TypeScript, and Webpack by AngularClass",
  "author": "Patrick Stapleton <patrick@angularclass.com>",
  "homepage": "https://github.com/angularclass/angular2-webpack-starter",
  "license": "MIT",
  "scripts": {
    "clean": "npm cache clean && rimraf node_modules doc typings coverage dist",
    "clean:dist": "rimraf dist",
    "preclean:install": "npm run clean",
    "clean:install": "npm set progress=false && npm install",
    "preclean:start": "npm run clean",
    "clean:start": "npm start",
    "watch": "npm run watch:dev",
    "watch:dev": "webpack --watch --progress --profile --colors --display-error-details --display-cached",
    "watch:dev:hmr": "npm run watch:dev -- --hot",
    "watch:test": "npm run test -- --auto-watch --no-single-run",
    "watch:prod": "webpack --watch --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached",
    "build": "npm run build:dev",
    "prebuild:dev": "npm run clean:dist",
    "build:dev": "webpack --progress --profile --colors --display-error-details --display-cached",
    "prebuild:prod": "npm run clean:dist",
    "build:prod": "webpack --config webpack.prod.config.js --progress --profile --colors --display-error-details --display-cached --bail",
    "server": "npm run server:dev:hmr",
    "server:dev": "webpack-dev-server --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/",
    "server:dev:hmr": "npm run server:dev -- --hot",
    "server:prod": "http-server dist --cors",
    "webdriver:update": "webdriver-manager update",
    "webdriver:start": "webdriver-manager start",
    "lint": "./node_modules/.bin/tslint src/**/*.ts",
    "pree2e": "npm run webdriver:update -- --standalone",
    "e2e": "protractor",
    "e2e:live": "protractor --elementExplorer",
    "test": "karma start",
    "ci": "npm run e2e && npm run test",
    "docs": "typedoc --options typedoc.json --exclude **/*.spec.ts ./src/",
    "start": "npm run server",
    "typings-install": "typings install",
    "postinstall": "npm run typings-install",
    "preversion": "npm test",
    "version": "npm run build",
    "postversion": "git push && git push --tags"
  },
  "dependencies": {
    "angular2": "2.0.0-beta.9",
    "core-js": "^2.2.0",
    "moment": "^2.12.0",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.5.15"
  },
  "devDependencies": {
    "awesome-typescript-loader": "^0.16.0-rc.0",
    "compression-webpack-plugin": "^0.3.0",
    "copy-webpack-plugin": "^1.1.1",
    "crypto-js": "^3.1.6",
    "css-loader": "^0.23.1",
    "es6-promise": "^3.1.2",
    "es6-promise-loader": "^1.0.1",
    "es6-shim": "^0.35.0",
    "es7-reflect-metadata": "^1.6.0",
    "exports-loader": "^0.6.3",
    "expose-loader": "^0.7.1",
    "file-loader": "^0.8.5",
    "html-webpack-plugin": "^2.10.0",
    "http-server": "^0.9.0",
    "ie-shim": "^0.1.0",
    "imports-loader": "^0.6.5",
    "istanbul-instrumenter-loader": "^0.2.0",
    "json-loader": "^0.5.4",
    "karma": "^0.13.22",
    "karma-chrome-launcher": "^0.2.2",
    "karma-coverage": "^0.5.5",
    "karma-jasmine": "^0.3.7",
    "karma-mocha-reporter": "^2.0.0",
    "karma-phantomjs-launcher": "^1.0.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "1.7.0",
    "ng2lint": "0.0.10",
    "parse5": "^2.1.5",
    "phantomjs-polyfill": "0.0.2",
    "phantomjs-prebuilt": "^2.1.5",
    "protractor": "^3.1.1",
    "raw-loader": "0.5.1",
    "remap-istanbul": "^0.5.1",
    "rimraf": "^2.5.2",
    "source-map-loader": "^0.1.5",
    "style-loader": "^0.13.0",
    "ts-helper": "0.0.1",
    "ts-node": "^0.6.1",
    "tslint": "^3.6.0",
    "tslint-loader": "^2.1.3",
    "typedoc": "^0.3.12",
    "typescript": "~1.8.7",
    "typings": "^0.7.9",
    "url-loader": "^0.5.7",
    "webpack": "^1.12.14",
    "webpack-dev-server": "^1.14.1",
    "webpack-md5-hash": "^0.0.5"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/angularclass/angular2-webpack-starter.git"
  },
  "bugs": {
    "url": "https://github.com/angularclass/angular2-webpack-starter/issues"
  },
  "engines": {
    "node": ">= 4.2.1",
    "npm": ">= 3"
  }
}

@nadavsinai
Copy link

might be related to your use of "awesome-typescript-loader": "^0.16.0-rc.0" I suspect the problem is with typescript perhaps related to microsoft/TypeScript#7444, how I wish that typescript could just do type warnings and strip them.leaving compilation to Babel..

@alvipeo
Copy link
Author

alvipeo commented Mar 16, 2016

No, that actually didn't help. Still having this problem. Overall, it's like a lottery now... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants