You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to most of this stuff, and I've run into a problem that I can't solve. I followed your instructions and have started the Angular2 app. It seems to start fine.
However, when I try to run the tests, this is what I get:
(docker) root@2b5024c9aa49:/src/savethecode# npm test
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.9.4
npm info lifecycle angular2-webpack@1.0.0pretest: angular2-webpack@1.0.0
npm info lifecycle angular2-webpack@1.0.0test: angular2-webpack@1.0.0
angular2-webpack@1.0.0 test /src/savethecode
gulp i18n-xlf2ts && karma start
[03:02:44] Using gulpfile /src/savethecode/gulpfile.js
[03:02:44] Starting 'i18n-xlf2ts'...
Transpiling XLF translation files to TS...
[03:02:44] Finished 'i18n-xlf2ts' after 79 ms
==> ./src/resources/i18n/messages.en.ts
==> ./src/resources/i18n/messages.es.ts
20 01 2017 03:03:08.558:WARN [watcher]: Pattern "/src/savethecode/config/karma-test-shim.js" does not match any file.
20 01 2017 03:03:08.589:WARN [watcher]: Pattern "/src/savethecode/config/karma-test-shim.js" does not match any file.
webpack: bundle is now VALID.
20 01 2017 03:03:08.668:INFO [karma]: Karma v1.4.0 server started at http://0.0.0.0:9876/
20 01 2017 03:03:08.670:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
20 01 2017 03:03:09.027:INFO [launcher]: Starting browser PhantomJS
20 01 2017 03:03:10.633:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket NvcqWBXAr24l5ou-AAAA with id 86578905
PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.026 secs / 0 secs)
npm info lifecycle angular2-webpack@1.0.0~test: Failed to exec test script
npm ERR! Test failed. See above for more details.
So I copied in karma-test-shim.js. This has a dependency on system.js, which I installed into the Dockerfile and added to the root package.json. Now Phantom.js is complaining that it can't find system.js:
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
ReferenceError: Can't find variable: System
at webpack:///config/karma-test-shim.js:27:0 <- config/karma-test-shim.js:73
I'm assuming there's a way to make sure Phantom.js can find it, but I don't know how, and I would rather not start guessing.
Can you please look into this and perhaps update your code in GitHub to reflect the necessary updates?
Thanks,
Doug
The text was updated successfully, but these errors were encountered:
This is very cool.
I'm new to most of this stuff, and I've run into a problem that I can't solve. I followed your instructions and have started the Angular2 app. It seems to start fine.
However, when I try to run the tests, this is what I get:
(docker) root@2b5024c9aa49:/src/savethecode# npm test
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.9.4
npm info lifecycle angular2-webpack@1.0.0
pretest: angular2-webpack@1.0.0test: angular2-webpack@1.0.0npm info lifecycle angular2-webpack@1.0.0
angular2-webpack@1.0.0 test /src/savethecode
gulp i18n-xlf2ts && karma start
[03:02:44] Using gulpfile /src/savethecode/gulpfile.js
[03:02:44] Starting 'i18n-xlf2ts'...
Transpiling XLF translation files to TS...
[03:02:44] Finished 'i18n-xlf2ts' after 79 ms
==> ./src/resources/i18n/messages.en.ts
==> ./src/resources/i18n/messages.es.ts
20 01 2017 03:03:08.558:WARN [watcher]: Pattern "/src/savethecode/config/karma-test-shim.js" does not match any file.
20 01 2017 03:03:08.589:WARN [watcher]: Pattern "/src/savethecode/config/karma-test-shim.js" does not match any file.
webpack: bundle is now VALID.
20 01 2017 03:03:08.668:INFO [karma]: Karma v1.4.0 server started at http://0.0.0.0:9876/
20 01 2017 03:03:08.670:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
20 01 2017 03:03:09.027:INFO [launcher]: Starting browser PhantomJS
20 01 2017 03:03:10.633:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket NvcqWBXAr24l5ou-AAAA with id 86578905
PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.026 secs / 0 secs)
npm info lifecycle angular2-webpack@1.0.0~test: Failed to exec test script
npm ERR! Test failed. See above for more details.
So I copied in karma-test-shim.js. This has a dependency on system.js, which I installed into the Dockerfile and added to the root package.json. Now Phantom.js is complaining that it can't find system.js:
PhantomJS 2.1.1 (Linux 0.0.0) ERROR
ReferenceError: Can't find variable: System
at webpack:///config/karma-test-shim.js:27:0 <- config/karma-test-shim.js:73
I'm assuming there's a way to make sure Phantom.js can find it, but I don't know how, and I would rather not start guessing.
Can you please look into this and perhaps update your code in GitHub to reflect the necessary updates?
Thanks,
Doug
The text was updated successfully, but these errors were encountered: