Im trying to following the instructions on https://webdev.dartlang.org/guides/get-started
I have installed 2.0.0-dev.55.0 in /usr/lib/dart.
And have Dartium installed in /home/bob/Documents/software/dartium-linux-x64-stable-1.24.2.0/chrome.
When I try 5. Run the app. I get the following:
pubspec.yaml
name: angular_app
description: A web app that uses AngularDart
version: 0.0.1
environment:
sdk: '>=2.0.0-dev.51.0 <2.0.0'
dependencies:
angular: ^5.0.0-alpha+12
dev_dependencies:
angular_test: ^2.0.0-alpha
build_runner: ^0.8.8
build_test: ^0.10.2
build_web_compilers: ^0.4.0
test: ^0.12.30
I have tried right-click pubspec.yaml and choose Pub: Get Dependencies but this didnt make any difference.
I have also tried using the sample dart project from https://github.com/angular-examples/quickstart which uses Dart 2, and NOT using Dartium. But I still get the same error.
When I run pub run build_runner serve I get
Could not find bin/build_runner.dart in package build_runner.
Building in WebStorm
When I build using Webstorm, everything looks rosie:
Working dir: /home/anton/WebstormProjects/quickstart
/usr/lib/dart/bin/pub global run webdev build --output=web:build
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 675ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 808ms
[INFO] Running build...
[INFO] build_web_compilers|entrypoint on web/main.dart:Running dart2js with --minify --packages=.package-643dc5d58d0e8c6a495fcb24c0476818 -oweb/main.dart.js web/main.dart
[INFO] 1.5s elapsed, 3/4 actions completed.
[INFO] 2.6s elapsed, 3/4 actions completed.
[INFO] 3.7s elapsed, 3/4 actions completed.
[INFO] 4.8s elapsed, 3/4 actions completed.
[INFO] 5.9s elapsed, 3/4 actions completed.
[INFO] 7.0s elapsed, 3/4 actions completed.
[INFO] 8.1s elapsed, 3/4 actions completed.
[INFO] build_web_compilers|entrypoint on web/main.dart:Dart2Js finished with:
Compiled 9,664,399 characters Dart to 162,915 characters JavaScript in 7.72 seconds
Dart file (web/main.dart) compiled to JavaScript: web/main.dart.js
[INFO] Running build completed, took 9.2s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 271ms
[INFO] Creating merged output dir `build`...
[INFO] Creating merged output dir `build` completed, took 2.9s
[INFO] Writing asset manifest...
[INFO] Writing asset manifest completed, took 3ms
[INFO] Succeeded after 12.3s with 3 outputs (1859 actions)
Process finished with exit code 0
I have also tried using https://github.com/dart-lang/angular/tree/master/examples but still get the same error.
Related
I am trying to build a Spring Native application using buildpacks by following the instructions from: https://docs.spring.io/spring-native/docs/current/reference/htmlsingle/#getting-started
I changed Java version to 11 or 17 to avoid an error. Locally I have installed GraalVM v17 (22.2.0 and 22.3.0-dev).
When running mvn spring-boot:build-image I receive the following error related to BeanUtils:
[INFO] [creator] Fatal error: com.oracle.graal.pointsto.util.AnalysisError$ParsingError:
Error encountered while parsing
org.springframework.boot.SpringApplication.createSpringFactoriesInstances(java.lang.Class, java.lang.Class[], java.lang.ClassLoader, java.lang.Object[], java.util.Set)
[INFO] [creator] Parsing context:
[INFO] [creator] at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:439)
[INFO] [creator] at org.springframework.nativex.substitutions.boot.Target_SpringApplication.getSpringFactoriesInstances(Target_SpringApplication.java:173)
[INFO] [creator] at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:424) [INFO] [creator]
[INFO] [creator] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.AnalysisError.parsingError(AnalysisError.java:152)
[INFO] [creator] at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.flow.MethodTypeFlow.createFlowsGraph(MethodTypeFlow.java:104)
[...]
[INFO] [creator] Caused by: org.graalvm.compiler.java.BytecodeParser$BytecodeParserError:
com.oracle.graal.pointsto.constraints.UnresolvedElementException:
Discovered unresolved method during parsing:
org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]).
This error is reported at image build time because class
org.springframework.beans.BeanUtils is registered for linking at image build time by system default
[INFO] [creator] at parsing org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:196) [...]
[INFO] [creator] ... 13 more
[INFO] [creator] Caused by: com.oracle.graal.pointsto.constraints.UnresolvedElementException:
Discovered unresolved method during parsing:
org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(java.lang.reflect.Constructor, java.lang.Object[]).
This error is reported at image build time because class
org.springframework.beans.BeanUtils is registered for
linking at image build time by system default
... 38 more
[INFO] [creator] --------------------------------------------------------------------------------
The build is working fine when using Native Build Tools. The .exe files executes correctly ( I am using Windows).
Seems like there is an issue with paketobuildpacks/builder:0.1.242-tiny which I also experienced in paketobuildpacks/builder:base.
Downgrading to 0.1.241-tiny seems to resolve the issue.
See paketo-buildpacks/native-image#176 for workarounds to this problem, and follow that issue for the resolution.
This error has suddenly started appearing recently on all projects (without making any changes) which were building fine with
spring-boot:build-image.
I was trying to use an existing application as starting point for a new one.
So, I copied over the src-folder, the pom and a couple of IDE-specific files config files.
I then refactored all giving it a new path and application name and then I wanted to do a first build and entered mvn install.
This process is now hanging since 1 1/2 hours in vaadin-maven-plugin:18.0.2:build-frontend (see full console output below).
Is this expected or why is this taking so long? Can I somehow figure out, why and where this is hanging?
What am I missing? Are there any files other then those mentioned that absolutely MUST exist before a new Vaadin application can (even be tried to) be built?
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< ch.zh.ksta.monitoring:my_app >---------------
[INFO] Building KStA-ZH-Monitoring 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) # my_app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # my_app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- vaadin-maven-plugin:18.0.2:prepare-frontend (default) # my_app ---
[INFO] writing file D:\Projects\my_app\target\flow-frontend\package.json.
[INFO] writing file D:\Projects\my_app\target\flow-frontend\form\package.json.
[INFO] writing file 'D:\Projects\my_app\target\index.html'
[INFO] writing file 'D:\Projects\my_app\target\index.ts'
[INFO] Copying frontend resources from jar files ...
[INFO] Visited 173 resources. Took 2229 ms.
[INFO]
[INFO] --- vaadin-maven-plugin:18.0.2:build-frontend (default) # my_app ---
[INFO] Scanning classes to find frontend configurations and dependencies...
[INFO] Visited 720 classes. Took 2553 ms.
[INFO] Visited 126 classes. Took 138 ms.
[INFO] writing file D:\Projects\my_app\target\flow-frontend\package.json.
[INFO] writing file D:\Projects\my_app\target\flow-frontend\form\package.json.
[INFO] writing file 'D:\Projects\my_app\target\index.html'
[INFO] writing file 'D:\Projects\my_app\target\index.ts'
[INFO] Parsing java files from [D:\Projects\my_app\src\main\java]
[INFO] There are no connect endpoints to generate.
[INFO] Running `pnpm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
[INFO] Generated pnpmfile hook file: 'D:\Projects\my_app\pnpmfile.js'
[INFO] installing pnpm version 4.4.0 locally
[INFO] using 'C:\Users\mmo\.vaadin\node\node.exe C:\Users\mmo\.vaadin\node_modules\pnpm\bin\pnpm.js' for frontend package installation
Later addition:
If I terminate this using ^C I get:
...
2021-05-31 18:24:40,199 ERROR [task-1] com.vaadin.flow.server.frontend.TaskRunNpmInstall: Command `C:\Program Files\nodejs\node.exe C:\Users\mmo\.vaadin\node_modules\pnpm\bin\pnpm.js --shamefully-hoist=true install` failed:
Using hooks from: D:\Projects\my_app\pnpmfile.jsreadPackage hook is declared. Manifests of dependencies might get overridden
2021-05-31 18:24:40,201 ERROR [task-1] com.vaadin.flow.server.frontend.TaskRunNpmInstall: >>> Dependency ERROR. Check that all required dependencies are deployed in pnpm repositories.
2021-05-31 18:24:40,205 DEBUG [task-1] com.vaadin.flow.server.startup.DevModeInitializer: Could not initialize dev mode handler. One of the node tasks failed
com.vaadin.flow.server.ExecutionFailedException: Pnpm install has exited with non zero status. Some dependencies are not installed. Check pnpm command output
at com.vaadin.flow.server.frontend.TaskRunNpmInstall.runNpmInstall(TaskRunNpmInstall.java:405)
at com.vaadin.flow.server.frontend.TaskRunNpmInstall.execute(TaskRunNpmInstall.java:120)
at com.vaadin.flow.server.frontend.NodeTasks.execute(NodeTasks.java:634)
at com.vaadin.flow.server.startup.DevModeInitializer.runNodeTasks(DevModeInitializer.java:471)
at com.vaadin.flow.server.startup.DevModeInitializer.lambda$initDevModeHandler$0(DevModeInitializer.java:381)
at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
If I restart the build again it will hang again.
Gee - is this brittle... :-(
Got this same error. I deleted from my home directory:
.vaadin
.pnpm-store
... and the generated stuff from my project:
webpack.config.js
tsconfig.json
types.d.ts
webpack.config.js
webpack.generated.js
pnpm-lock.yaml
pnpmfile.js
package.json
.npmrc
target
.pnpm-debug.log
... probably overkill, but then it worked again.
I am running an AngularDart project in a Docker Container google/dart and install webdev.
It is running very slow, so I have tried to add more cpu - do you know how to optimise and make it faster and is it good practice to run AngularDart in google/dart?
docker container run --name webdev -it --rm -p 8080:8080 -v $(pwd):/usr/src/app --cpu-shares=2 google/dart
The first time, it builds ok, but after making changes - the second build is very slow.
You can see the build log here:
webdev serve --hostname 0.0.0.0
Creating build script, took 22350ms
[INFO] Setting up file watchers completed, took 135ms
[INFO] Waiting for all file watchers to be ready completed, took 5.6s
[INFO] Reading cached asset graph completed, took 2.9s
[INFO] Checking for updates since last build completed, took 4.3s
[INFO] Running build completed, took 1.9s
[INFO] Caching finalized dependency graph completed, took 1.5s
[INFO] Succeeded after 3.5s with 0 outputs (0 actions)
Serving `web` on http://0.0.0.0:8080
Serving `test` on http://0.0.0.0:8081
[INFO] ------------------------------------------------------------------------
[INFO] Starting Build
[INFO] Updating asset graph completed, took 57ms
[WARNING] No actions completed for 32.6s, waiting on:
- angular on lib/app_component.dart
[WARNING] No actions completed for 15.0s, waiting on:
- build_web_compilers|ddc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 15.1s, waiting on:
- build_web_compilers|ddc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 20.6s, waiting on:
- build_modules|dartdevc on lib/app_component.template.dartdevc.module
[WARNING] No actions completed for 31.2s, waiting on:
- build_modules|dartdevc on lib/app_component.template.dartdevc.module
[INFO] Running build completed, took 2m 28s
[INFO] Caching finalized dependency graph completed, took 3.1s
[INFO] Succeeded after 2m 31s with 12 outputs (10 actions)
This is similar to the asked and answered question Maven test dependency on multi module project. However, this has nothing to do with the test phase, instead I'm having problems with package.
I have a multi-module project something like:
root
|
|-parent-client
| |
| |-client-1
| |
| \-client-2
|
\-parent-server
|
|-server-1
|
|-server-2
|
|-server-3
|
\-server-4
My dependencies are client-1 -> client-2 -> server-1 -> server-2 -> server-3 -> server-4, which is to say that client-2 depends on server-1, server-1 depends on server-2, and so on. Each is scoped to compile.
So the problem is that when I run mvn clean package in the root, I get a compilation failure in server-2 that package server-3 does not exist.
When I run mvn clean compile followed by mvn package in the root, it runs through without issue.
It always fails at the same module when it fails.
My understanding of the Build Lifecycle is that compile package is redundant since package includes the compile lifecycle.
The project is more complex, with a total of 41 modules, two parents and one root. Creating a simple example inevitably works as expected.
I'm stumped as to how I should proceed.
Update 2015-10-25
Turns out I was wrong about the order of commands for success. I've updated my question and the description, and included debug output per Michael-O's request:
<snip/>
[INFO] --- maven-ejb-plugin:2.3:ejb (default-ejb) # terradatum-systemconfig ---
[INFO] Building EJB terradatum-systemconfig-4.8.1-SNAPSHOT with EJB version 3.0
[INFO] Building jar: /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/systemconfig/ejb/target/terradatum-systemconfig-4.8.1-SNAPSHOT.jar
[INFO] Building EJB client terradatum-systemconfig-4.8.1-SNAPSHOT-client
[INFO] Building jar: /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/systemconfig/ejb/target/terradatum-systemconfig-4.8.1-SNAPSHOT-client.jar
<snip/>
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building terradatum-payment 4.8.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # terradatum-payment ---
[INFO] Deleting /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/target
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # terradatum-payment ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.3:compile (default-compile) # terradatum-payment ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] bootstrap class path not set in conjunction with -source 1.6
[INFO] 1 warning
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/rbellamy/Development/Terradatum/metrics-project/metrics-server/payment/ejb/src/main/java/com/terradatum/common/payment/PaymentRemoteDelegate.java:[13,42] package com.terradatum.common.systemconfig does not exist
<snip/>
Update 2015-11-16
After much refactoring the build no longer fails in the same place. I've seen it fail in a similar way, consistently, but the location of the failure moves around. I am not running multiple threads, but it seems very clear to me there's a race somewhere in which an obviously available package (absolutely located and reachable in my ~/.m2/repository local cache, and added to the classpath) is not visible to the Maven compiler.
And knowing what I know about race conditions, I have no idea how I would file a bug report of any substance given I can't offer anything more than supposition and finger pointing.
I have been doing http://wso2.com/library/tutorials/2014/03/how-to-write-a-wso2-carbon-component/ but when I create client using wsdl file I got this error. How can I solve this issue.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building WSO2 Carbon - Student Manager Stub 4.2.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- build-helper-maven-plugin:1.9.1:add-source (add-source) # org.wso2.carbon.student.mgt.stub ---
[INFO] Source directory: /home/jobs/wso2/Carbon/Old/org.wso2.carbon.student.mgt.stub/target/generated-code/src added.
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # org.wso2.carbon.student.mgt.stub ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-antrun-plugin:1.1:run (source-code-generation) # org.wso2.carbon.student.mgt.stub ---
[INFO] Executing tasks
[java] Retrieving document at 'src/main/resources/StudentManager.wsdl'.
[java] Dec 05, 2014 1:05:42 AM org.apache.axis2.schema.SchemaCompiler compile
[java] WARNING: No schemaLocation for import of http://data.mgt.student.carbon.wso2.org/xsd; compilation may fail
[INFO] Executed tasks
[INFO]
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) # org.wso2.carbon.student.mgt.stub ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 8 source files to /home/jobs/wso2/Carbon/Old/org.wso2.carbon.student.mgt.stub/target/classes
Actually what is this warning means? This where what I cant understand ..
[java] WARNING: No schemaLocation for import of http://data.mgt.student.carbon.wso2.org/xsd; compilation may fail
It looks like domain class has not been updated in ../data/xsd directory in the target code. I suspect that the backend component has been updated and the wsdl has been altered, but the stub has not been updated/created yet. Therefore the client side component doesn't aware of the modifications. I suggest that you may update the wsdl file in stub resources and rebuilding the stub and client should probably solve the issue.