lbialy / play-ng2-webpack2 Goto Github PK
View Code? Open in Web Editor NEWPlay 2.6.0 + Angular with Angular-CLI + SBT - based build
License: Other
Play 2.6.0 + Angular with Angular-CLI + SBT - based build
License: Other
EXCEPTION: Uncaught (in promise): Error: Loading chunk 0 failed.
Error: Loading chunk 0 failed.
at HTMLScriptElement.onScriptComplete (http://localhost:9000/assets/inline.bundle.js:92:33) [angular]
at HTMLScriptElement.wrapFn (http://localhost:9000/assets/polyfills.bundle.js:7053:29) [angular]
at Object.onInvokeTask (http://localhost:9000/assets/vendor.bundle.js:28837:37) [angular]
at ZoneDelegate.invokeTask (http://localhost:9000/assets/polyfills.bundle.js:6225:36) [angular]
at Zone.runTask (http://localhost:9000/assets/polyfills.bundle.js:6029:47) [ => angular]
at HTMLScriptElement.ZoneTask.invoke (http://localhost:9000/assets/polyfills.bundle.js:6279:38) []
Hi ,
I am using your template since a while. It fits our requirements. But for mobile development I need to use ionic3 with angular.I have updated angular version to 4.4.4. Because ionic3 needs to have angular version of >4.0.0. But I am unable to integrate ionic3 to the existing project. Can you show me a way of using ionic3 with pla-ng2-webpack2 template.
Thanks in advance.
Hey guys, I've been tracking progress being made in Angular 2, angular-cli and Webpack 2 communities in some of my free time, because of few things I'd like to incorporate into this seed:
I'd like to update this seed before the new year with:
Tree-shaking, AoT and SSR will have to wait for upstream I'm afraid. I'll have some free time between Christmas and New Year's Eve and I'm scheduling some time for this then.
Cheers!
I get the following error while running sbt test
>sbt test
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading project definition from C:\Users\guest-hkir\Documents\play-ng2-webpack2\project
[info] Set current project to play-ng (in build file:/C:/Users/guest-hkir/Documents/play-ng2-webpack2/)
> [email protected] build C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui
> ng build --extract-css --progress --output-path ../public/ui
Hash: dc9e1cd4ceb875d9788f
Time: 7356ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 232 kB {4} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.js.map (main) 4.89 kB {3} [initial] [rendered]
chunk {2} styles.bundle.css, styles.bundle.css.map (styles) 69 bytes {4} [initial] [rendered]
chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.39 MB [initial] [rendered]
chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
> [email protected] test-no-watch C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui
> ng test --single-run
10% building modules 1/1 modules 0 active06 06 2017 10:55:19.253:INFO [karma]: Karma v1.4.1 server started at http://0.0.0.0:9876/
06 06 2017 10:55:19.255:INFO [launcher]: Launching browser Chrome with unlimited concurrency
06 06 2017 10:55:19.260:INFO [launcher]: Starting browser Chrome
06 06 2017 10:55:24.949:ERROR [karma]: Error: C:/Users/guest-hkir/Documents/play-ng2-webpack2/ui/node_modules/@angular/core/src/testability/testability.d.ts (41,33): Cannot find name 'Node'.
at Compiler.compiler.plugin (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\@angular\cli\plugins\karma-webpack-throw-error.js:10:23)
at Compiler.applyPlugins (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:61:14)
at Watching._done (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compiler.js:92:17)
at onCompiled (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compiler.js:51:17)
at C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compiler.js:494:13
at next (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:138:11)
at Compiler.<anonymous> (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\CachePlugin.js:62:5)
at Compiler.applyPluginsAsyncSeries (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:142:13)
at C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compiler.js:491:10
at Compilation.applyPluginsAsyncSeries (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:131:46)
at self.applyPluginsAsync.err (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compilation.js:645:19)
at next (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:138:11)
at Compilation.compilation.plugin (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\ProgressPlugin.js:121:6)
at Compilation.applyPluginsAsyncSeries (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:142:13)
at self.applyPluginsAsync.err (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\webpack\lib\Compilation.js:636:11)
at next (C:\Users\guest-hkir\Documents\play-ng2-webpack2\ui\node_modules\tapable\lib\Tapable.js:138:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test-no-watch: `ng test --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test-no-watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\guest-hkir\AppData\Roaming\npm-cache\_logs\2017-06-06T08_55_25_386Z-debug.log
java.lang.Exception: UI tests failed!
at $8bcc161bf26d71a48f28$$anonfun$$sbtdef$1.apply(C:\Users\guest-hkir\Documents\play-ng2-webpack2\build.sbt:69)
at $8bcc161bf26d71a48f28$$anonfun$$sbtdef$1.apply(C:\Users\guest-hkir\Documents\play-ng2-webpack2\build.sbt:67)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[error] (*:Run UI tests when testing application.) java.lang.Exception: UI tests failed!
Should note this is happening on both Windows and OSX. Any clues?
When npm install
is run the following error is encountered.
chmod: cannot access 'normalize_file_names.sh': No such file or directory
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-64-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: `chmod +x normalize_file_names.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script 'chmod +x normalize_file_names.sh'.
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 ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! chmod +x normalize_file_names.sh
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/diederik/Documents/easycrypto/temp/angular2play/ui/npm-debug.log
normalize_file_names.sh cannot be found.
This is due to the fact that in the last commit the file was deleted, since it was not needed anymore. See: 454fed7
Delete "postinstall": "chmod +x normalize_file_names.sh"
from package.json
Documentation states "Changes in ui folder don't cause Play reloads, but are observed (and handled) by Angular-CLI when Play is running in dev mode", however if I change something at ui I have to touch e.g. application.conf to get the change visible in my app.
Am I doing something wrong? How is your experience with this?
I get the following error when I start the application (Windows 10 OS):
--- (Running the application, auto-reloading is enabled) ---
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
> [email protected] build C:\dev\Play Framework\ocd\ui
> ng build --extract-css --progress --output-path ../public/ui "--watch"
ENOTEMPTY: directory not empty, rmdir 'C:\dev\Play Framework\ocd\public\ui'
Error: ENOTEMPTY: directory not empty, rmdir 'C:\dev\Play Framework\ocd\public\ui'
at Error (native)
at Object.fs.rmdirSync (fs.js:886:18)
at rmkidsSync (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:355:25)
at rmdirSync (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:333:7)
at Function.rimrafSync [as sync] (C:\dev\Play Framework\ocd\ui\node_modules\rimraf\rimraf.js:303:9)
at Class.run (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\tasks\build.js:25:16)
at Class.run (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\commands\build.js:143:26)
at Class.<anonymous> (C:\dev\Play Framework\ocd\ui\node_modules\@angular\cli\ember-cli\lib\models\command.js:134:17)
at process._tickCallback (internal/process/next_tick.js:103:7)
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--" "--watch"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build: `ng build --extract-css --progress --output-path ../public/ui "--watch"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script 'ng build --extract-css --progress --output-path ../public/ui "--watch"'.
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 ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng build --extract-css --progress --output-path ../public/ui "--watch"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ui
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\dev\Play Framework\ocd\ui\npm-debug.log
It seems the Build Hook can't remove the public/ui directory. If I manually delete such directory, make a clean/compile/run The angular build go further without error.
Somebody have experienced this issue?
Thanks.
Pasquale
Hi,
Can you please update the readme to validate if the angular-cli gotcha's are still valid? Is it possible to update the Angular version to recent version now
Thanks
Hello,
I have 2 problems. I'm running on Windows 10. I have been about to get other templates working on play.
Yes I do have npm installed and it is in my path.
Any thoughts?
Thanks, Chris.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.