I am new to Angular CLI. My background is in C# ASP.NET. I recently spun up a ASP.NET Core app with Angular CLI through the project wizard of Visual Studio. All that I needed to do to get things working on http://localhost:4200 was to run npm install #angular/cli
and then
ng serve
and I was good to go.
To get the latest stable release of Angular, I then ran
ng update
Now, ng serve returns the error "The serve command requires to be run in an Angular project, but a project definition could not be found."
Also, one other observation is that the $schema reference to schema.json from the .angular-cli.json file is no longer available in the path "./node_modules/#angular/cli/lib/config/schema.json". The config folder is completely missing and I've read that it the config folder was eliminated in a previous version.
My question, is how do i change my .angular-cli.json or other project files to conform to the new standard?
Below is a screenshot of my current versions.
C:\Users\andrew.kirby\source\repos\SchoolsList\SchoolsList\ClientApp>ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 7.3.8
Node: 10.9.0
OS: win32 x64
Angular: 7.2.14
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
------------------------------------------------------
#angular-devkit/architect 0.13.8
#angular-devkit/core 7.3.8
#angular-devkit/schematics 7.3.8
#angular/cli 7.3.8
#schematics/angular 7.3.8
#schematics/update 0.13.8
rxjs 6.5.1
typescript 3.2.4
Related
So I'm just trying to get a project set up using JDK 15 / SBT 1.5.4 / Scala 2.13.6 all of which have been installed via brew on MacOS.
However before I even attempt to build via intellij etc. I'm unable to connect to the sbt shell via a normal terminal.
[info] welcome to sbt 1.5.4 (AdoptOpenJDK Java 15.0.2)
[info] loading global plugins from /Users/user/.sbt/1.0/plugins
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class com.swoval.runtime.ShutdownHooks
at com.swoval.runtime.ShutdownHooks$1.run(ShutdownHooks.java:25)
I've tried reinstalling all three dependancies a few times and cleared the cache but still nothing. I'm guessing something isn't configured right because it's unable to even connect to the shell.
Thanks!
EDIT: I've just followed the install steps on the sbt docs and the only requirements are JDK 11 or 8 and sbt itself. I've removed scala / JDK15 and re-downloaded JDK 11 via SDK-man this time and i'm still having the same issue.
EDIT 2: I've removed the .sbt directory and reinitiased and now sbt command is showing more output, hopefully this helps a little more.
java.lang.NoClassDefFoundError: Could not initialize class com.swoval.runtime.ShutdownHooks
at com.swoval.runtime.NativeLoader.loadPackaged(NativeLoader.java:143)
at com.swoval.runtime.NativeLoader.loadPackaged(NativeLoader.java:174)
at com.swoval.files.apple.FileEventMonitorImpl.<clinit>(FileEventMonitors.java:127)
at com.swoval.files.apple.FileEventMonitors.get(FileEventMonitors.java:47)
at com.swoval.files.ApplePathWatcher.<init>(ApplePathWatcher.java:258)
at com.swoval.files.ApplePathWatcher.<init>(ApplePathWatcher.java:194)
at com.swoval.files.ApplePathWatchers.get(ApplePathWatcher.java:331)
at com.swoval.files.PathWatchers.get(PathWatchers.java:84)
at com.swoval.files.FileTreeRepositories.get(FileTreeRepositories.java:64)
at com.swoval.files.FileTreeRepositories.get(FileTreeRepositories.java:32)
at sbt.internal.nio.FileTreeRepositoryImpl.<init>(FileTreeRepositoryImpl.scala:46)
at sbt.internal.nio.FileTreeRepository$.default(FileTreeRepository.scala:40)
at sbt.BuiltinCommands$.$anonfun$setupGlobalFileTreeRepository$1(Main.scala:985)
at sbt.BuiltinCommands$.$anonfun$doLoadProject$5(Main.scala:974)
at sbt.Project$.setProject(Project.scala:501)
at sbt.BuiltinCommands$.doLoadProject(Main.scala:974)
at sbt.BuiltinCommands$.$anonfun$loadProjectImpl$2(Main.scala:912)
at sbt.Command$.$anonfun$applyEffect$4(Command.scala:150)
at sbt.Command$.$anonfun$applyEffect$2(Command.scala:145)
at sbt.Command$.process(Command.scala:189)
at sbt.MainLoop$.$anonfun$processCommand$5(MainLoop.scala:245)
at scala.Option.getOrElse(Option.scala:189)
at sbt.MainLoop$.process$1(MainLoop.scala:245)
at sbt.MainLoop$.processCommand(MainLoop.scala:278)
at sbt.MainLoop$.$anonfun$next$5(MainLoop.scala:163)
at sbt.State$StateOpsImpl$.runCmd$1(State.scala:289)
at sbt.State$StateOpsImpl$.process$extension(State.scala:325)
at sbt.MainLoop$.$anonfun$next$4(MainLoop.scala:163)
at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
at sbt.MainLoop$.next(MainLoop.scala:163)
at sbt.MainLoop$.run(MainLoop.scala:144)
at sbt.MainLoop$.$anonfun$runWithNewLog$1(MainLoop.scala:119)
at sbt.io.Using.apply(Using.scala:27)
at sbt.MainLoop$.runWithNewLog(MainLoop.scala:112)
at sbt.MainLoop$.runAndClearLast(MainLoop.scala:66)
at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:51)
at sbt.MainLoop$.runLogged(MainLoop.scala:42)
at sbt.StandardMain$.runManaged(Main.scala:218)
at sbt.xMain$.$anonfun$run$11(Main.scala:133)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withIn(Console.scala:230)
at sbt.internal.util.Terminal$.withIn(Terminal.scala:560)
at sbt.internal.util.Terminal$.$anonfun$withStreams$1(Terminal.scala:350)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withOut(Console.scala:167)
at sbt.internal.util.Terminal$.$anonfun$withOut$2(Terminal.scala:550)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
at scala.Console$.withErr(Console.scala:196)
at sbt.internal.util.Terminal$.withOut(Terminal.scala:550)
at sbt.internal.util.Terminal$.withStreams(Terminal.scala:350)
at sbt.xMain$.withStreams$1(Main.scala:87)
at sbt.xMain$.run(Main.scala:121)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:56)
at sbt.xMain.run(Main.scala:46)
at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
at xsbt.boot.Launch$.run(Launch.scala:149)
at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
at xsbt.boot.Launch$.launch(Launch.scala:159)
at xsbt.boot.Launch$.apply(Launch.scala:44)
at xsbt.boot.Launch$.apply(Launch.scala:21)
at xsbt.boot.Boot$.runImpl(Boot.scala:78)
at xsbt.boot.Boot$.run(Boot.scala:73)
at xsbt.boot.Boot$.main(Boot.scala:21)
at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.NoClassDefFoundError: Could not initialize class com.swoval.runtime.ShutdownHooks
[error] Use 'last' for the full log.
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not initialize class com.swoval.runtime.ShutdownHooks
at com.swoval.runtime.ShutdownHooks$1.run(ShutdownHooks.java:25)
EDIT3: Tried creating a new user and just downloading sbt and still getting the same issue. Will attempt completely removing Java as it seems to be the culprit and reinstalling.
Similar to Boris's suggestion the issue lied in the installation version of Java.
There are two versions for AdoptOpenJDK, .j9 an .hs as seen below if you are using sdk-man as a package manager:
AdoptOpenJDK | >>> | 16.0.1.j9 | adpt | installed | 16.0.1.j9-adpt
| | 16.0.1.hs | adpt | | 16.0.1.hs-adpt
| | 11.0.11.j9 | adpt | | 11.0.11.j9-adpt
| | 11.0.11.hs | adpt | | 11.0.11.hs-adpt
For some reason the OpenJDK version .hs-adpt shows this issue for every version but the .j9-adpt version works fine.
TLDR: Install the .j9-adpt version of Java that you need otherwise .hs-adpt is not working for me with sbt version 1.5.4.
I assume the reason - you are using wrong Java JDK for Mac OS with M1 chip. You need to install proper Java JDK version, I use sdkman for that.
Install sdk man:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
set up sdk man to not use rosetta2_compatbile versions:
vim .sdkman/etc/config
and set sdkman_rosetta2_compatbile=false
choose java JDK from the list:
sdk list java
================================================================================
Available Java Versions
================================================================================
Vendor | Use | Version | Dist | Status | Identifier
--------------------------------------------------------------------------------
Azul Zulu | | 16.0.1 | zulu | | 16.0.1-zulu
| | 11.0.11 | zulu | | 11.0.11-zulu
| | 8.0.292 | zulu | | 8.0.292-zulu
BellSoft | | 16.0.1 | librca | | 16.0.1-librca
| | 11.0.11 | librca | | 11.0.11-librca
| | 8.0.292 | librca | | 8.0.292-librca
Java.net | | 18.ea.3 | open | | 18.ea.3-open
| | 18.ea.2 | open | | 18.ea.2-open
| | 18.ea.1 | open | | 18.ea.1-open
| | 17.ea.28 | open | | 17.ea.28-open
| | 17.ea.27 | open | | 17.ea.27-open
| | 17.ea.26 | open | | 17.ea.26-open
| | 17.ea.25 | open | | 17.ea.25-open
================================================================================
and install it using command sdk install java IDENTIFIER, i.e.:
sdk install java 16.0.1-zulu
So far, I user Spring Boot 2.2 and use jib to build a docker image.
But now, Spring Boot 2.3 released and the
Release Notes says that Spring Boot 2.3 can build a Docker image with Paketo buildpack by default.
Spring Boot 2.3 enhances Docker support with new features
This article says that Spring Boot 2.3 will allow for more efficient Docker builds.
I tried to build a docker image with Spring Boot 2.3.
As bellow, Spring Boot 2.3 can build an image with some jvm options by default to optimize memory.
Container memory limit unset. Configuring JVM for 1G container.
Calculated JVM Memory Configuration: -XX:MaxDirectMemorySize=10M -XX:MaxMetaspaceSize=83555K -XX:ReservedCodeCacheSize=240M -Xss1M -Xmx453020K (Head Room: 0%, Loaded Class Count: 12338, Thread Count: 250, Total Memory: 1.0G)
Adding 127 container CA certificates to JVM truststore
Spring Cloud Bindings Boot Auto-Configuration Enabled
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.1.RELEASE)
My Question:
Is A docker image built by Spring Boot 2.3 better than the one by jib?
Not better, but different. Jib can build the image without docker installation.
Spring docker build unpack the jar (slightly better on startup) and put dependencies into a layer. When you build new version, it can reuse those layers (if dependencies not changed), so it just create one layer with your app (which size is way less then the dependencies' size). This cause that the build will be faster. But you have to install local docker.
Codecov is failing to process the code coverage reports. It appears to upload successfully but gives the error: "There was an error processing coverage reports".
My project is already successfully integrated with Travis-CI. I am just trying to post my code coverage reports to Codecov.
It is a public project so it doesn't need a token for Codecov.
I have nothing but a sample test in this project so far. I am trying to make sure this integration works before moving forward.
I have enabled code coverage in the schema editor and when I run the tests in Xcode I can see it is generating code coverage reports.
Do I need to integrate with Slather to format my reports before sending them to Codecov?
Could the paths to my files be wrong?
# travis.yml
language:
- swift
osx_image: xcode10.2
script:
- xcodebuild -scheme Healthy -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone X,OS=12.2' -enableCodeCoverage YES build test
after_success:
- bash <(curl -s https://codecov.io/bash)
2.80s$ bash <(curl -s https://codecov.io/bash)
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-8a28df4
==> Travis CI detected.
project root: .
--> token set from env
Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
==> Processing Xcode reports via llvm-cov
DerivedData folder: /Users/travis/Library/Developer/Xcode/DerivedData
hint Speed up Swift processing by using use -J 'AppName' (regexp accepted)
hint This will remove Pods/ from your report. Also https://docs.codecov.io/docs/ignoring-paths
+ Building reports for Healthy framework
+ Building reports for HealthyTests xctest
-> Running gcov for Obj-C
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
+ .
-> Found 2 reports
==> Detecting git/mercurial file structure
==> Appending build variables
+ TRAVIS_OS_NAME
+ TRAVIS_RUBY_VERSION
==> Reading reports
+ ./HealthyTests.xctest.coverage.txt bytes=768
+ ./Healthy.framework.coverage.txt bytes=417
==> Appending adjustments
http://docs.codecov.io/docs/fixing-reports
+ Found adjustments
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: branch=master&commit=a88333de1e49b8ba01ea8afe1106eb4ebab45daf&build=22.1&build_url=&name=&tag=&slug=dcortright%2FHealthy&service=travis&flags=&pr=false&job=215842516
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-8a28df4&token=[secure]&branch=master&commit=a88333de1e49b8ba01ea8afe1106eb4ebab45daf&build=22.1&build_url=&name=&tag=&slug=dcortright%2FHealthy&service=travis&flags=&pr=false&job=215842516
-> Uploading
-> View reports at https://codecov.io/github/dcortright/Healthy/commit/a88333de1e49b8ba01ea8afe1106eb4ebab45daf
All I am seeing on my Codecov page is "There was an error processing coverage reports".
I was looking for logging frameworks available in OpenDaylight Controller.
Something similar to ELK stack.
I found apache decanter as a possible way to do this.
https://karaf.apache.org/manual/decanter/latest-1/
The problem is that it works fine with normal karaf shell but doesnt work so with the ODL karaf shell of Oxygen SR4 release.
As per the documentation,
https://karaf.apache.org/download.html#decanter-installation
feature:repo-add decanter
feature:install decanter-appender-elasticsearch
feature:install decanter-collector-log
feature:install decanter-collector-jmx
I tried the same in ODL karaf shell.
I downloaded the Oxygen-SR4 binary and started the karaf shell.
./karaf clean Apache Karaf starting up. Press Enter to open the shell now... 100% [========================================================================]
Karaf started in 0s. Bundle stats: 13 active, 13 total
________ ________ .__ .__ .__ __
\_____ \ ______ ____ ____ \______ \ _____ ___.__.| | |__| ____ | |___/ |_
/ | \\____ \_/ __ \ / \ | | \\__ \< | || | | |/ ___\| | \ __\
/ | \ |_> > ___/| | \| ` \/ __ \\___ || |_| / /_/ > Y \ |
\_______ / __/ \___ >___| /_______ (____ / ____||____/__\___ /|___| /__|
\/|__| \/ \/ \/ \/\/ /_____/ \/
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user#root>system:version
4.1.6
opendaylight-user#root>feature:repo-add decanter Adding feature url
opendaylight-user#root>feature:install decanter-appender-elasticsearch
org.apache.karaf.features.core[org.apache.karaf.features.internal.service.FeaturesServiceImpl] : null
But the same thing works with plain apache karaf shell.
./karaf
__ __ ____
/ //_/____ __________ _/ __/
/ ,< / __ `/ ___/ __ `/ /_
/ /| |/ /_/ / / / /_/ / __/
/_/ |_|\__,_/_/ \__,_/_/
Apache Karaf (4.2.5)
Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
karaf#root()> feature:repo-add decanter Adding feature url mvn:org.apache.karaf.decanter/apache-karaf-decanter/RELEASE/xml/features karaf#root()> feature:install decanter-appender-elasticsearch karaf#root()>
Can anyone point out what is missing here because I feel the shell versions are similar?
Can you also suggest some other logging frameworks to process Karaf logs and data in OpenDaylight Controller(Oxygen SR4) something similar to ELK stack.
we use decanter in upstream OpenDaylight system testing. the features we
install (using the featuresBoot variable in etc/org.apache.karaf.features.cfg are:
odl-jolokia,decanter-collector-jmx,decanter-appender-elasticsearch
but, we also configure the featuresRepositories to have:
mvn:org.apache.karaf.decanter/apache-karaf-decanter/1.0.0/xml/features
here is a wiki page with some extra info.
here is an example of us grabbing data to find Mem Usage and we also
install elasticsearch which lets us see it as a graph over time
Hope it helps.
When I start roo.sh, the command logs a lot of error about the version of libraries and the Roo version:
$ /opt/apps/ggg/spring-roo-2.0.0.RC1/bin/roo.sh
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: com.github.antlrjavaparser.antlr-java-parser:1.0.15
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.codec:1.8.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.io:2.4.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.commons.lang3:3.1.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.fusesource.jansi:1.6.0
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.jsoup:1.9.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.api:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.subsystem.core:2.0.8
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.apache.aries.util:1.1.1
... More "Auto-deploy" warnings and finally ...
_
___ _ __ _ __(_)_ __ __ _ _ __ ___ ___
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \
\__ \ |_) | | | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_| |_|_| |_|\__, | |_| \___/ \___/
|_| |___/ UNKNOWN VERSION
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo>
And if I create a project, the Spring Roo's version in the pom.xml file created is UNKNOWN VERSION:
<properties>
<roo.version>UNKNOWN VERSION</roo.version>
Then, if I fix the file setting the 2.0.0 RC1 version, when I start again the Roo console, it shows me:
...
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: org.springframework.roo.wrapping.snakeyaml:1.15.1
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.api:1.7.12
Auto-deploy install: org.osgi.framework.BundleException: Bundle symbolic name and version are not unique: slf4j.jdk14:1.7.12
_
___ _ __ _ __(_)_ __ __ _ _ __ ___ ___
/ __| '_ \| '__| | '_ \ / _` | | '__/ _ \ / _ \
\__ \ |_) | | | | | | | (_| | | | | (_) | (_) |
|___/ .__/|_| |_|_| |_|\__, | |_| \___/ \___/
|_| |___/ UNKNOWN VERSION
Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
WARNING: You are using Spring Roo UNKNOWN VERSION, but project was generated using Spring Roo 2.0.0 RC1.
If you continue with the execution your project might suffer some changes.
Do you want to continue opening Spring Roo Shell?(YES/No)
How can I fix this issue with the version? Is there a file where I can setup the version number?
I've saw that you're executing the roo.sh script in the following folder:
/opt/apps/ggg
Do you have admin permissions in that folder? Could you try to execute the roo.sh script inside ~/apps/ggg folder?
Let me know if that helps you.
Regards
I found the problem: Spring Roo uses the name of the folder where is contained to known its own version. After rename the folder /opt/apps/ggg/roo to /opt/apps/ggg/spring-roo-2.0.0.RC1 worked as expected.
I known that the original name in the distribution file downloaded from http://projects.spring.io/spring-roo/ was spring-roo-2.0.0.RC1 (I renamed it when I uncompressed the zip into /opt/apps/ggg), but I never thought that Spring used the folder name to known the version, and to be honest, I never saw a behavior like this, but renaming the folder name solve the problem.
Thanks for the help.