Nativescript project cannot run ng serve - nativescript

If I try to run the following command, this happens:
ng serve
An unhandled exception occurred: No projects support the 'serve' target.
See "/tmp/ng-YKKFYj/angular-errors.log" for further details.
in the same directory, where the angular.json, the package.json, src folder etc. is, see:
forest#forest:~/<project-path>$ ls -lsa
total 380
4 drwxrwxr-x 8 forest forest 4096 dec 17 17:44 .
4 drwxrwxr-x 7 forest forest 4096 dec 17 16:20 ..
4 -rw-r--r-- 1 forest forest 383 okt 26 1985 angular.json
4 drwxrwxr-x 4 forest forest 4096 dec 12 14:16 App_Resources
4 -rw-r--r-- 1 forest forest 202 okt 26 1985 .editorconfig
4 -rw-r--r-- 1 forest forest 260 dec 17 15:43 .gitignore
4 drwxrwxr-x 5 forest forest 4096 dec 17 14:02 hooks
4 drwxr-xr-x 3 root root 4096 dec 13 15:41 .idea
12 -rw-r--r-- 1 forest forest 11368 okt 26 1985 LICENSE
20 drwxrwxr-x 567 forest forest 20480 dec 17 16:15 node_modules
4 -rw-r--r-- 1 forest forest 62 okt 26 1985 nsconfig.json
4 -rw-rw-r-- 1 forest forest 1315 dec 17 16:15 package.json
264 -rw-rw-r-- 1 forest forest 267877 dec 17 16:15 package-lock.json
4 drwxrwxr-x 3 forest forest 4096 dec 17 16:04 platforms
4 drwxrwxr-x 4 forest forest 4096 dec 17 15:26 src
4 -rw-r--r-- 1 forest forest 670 dec 17 16:34 tsconfig.json
4 -rw-r--r-- 1 forest forest 126 okt 26 1985 tsconfig.tns.json
4 -rw-r--r-- 1 forest forest 38 okt 26 1985 tsfmt.json
4 -rw-rw-r-- 1 forest forest 3093 dec 17 17:44 tslint.json
4 -rw-r--r-- 1 forest forest 1575 dec 12 18:16 tslint_old.json
16 -rw-rw-r-- 1 forest forest 14103 dec 17 13:23 webpack.config.js
forest#forest:~/<project-path>$ ng serve
An unhandled exception occurred: No projects support the 'serve' target.
See "/tmp/ng-dO1bgr/angular-errors.log" for further details.
Versions:
$ng --version:
Angular CLI: 8.3.19
Node: 12.3.1
OS: linux x64
Angular: 8.2.14
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
------------------------------------------------------
#angular-devkit/architect 0.803.19 (cli-only)
#angular-devkit/core 8.2.2
#angular-devkit/schematics 8.3.19 (cli-only)
#ngtools/webpack 8.2.2
#schematics/angular 8.3.19 (cli-only)
#schematics/update 0.803.19 (cli-only)
rxjs 6.5.3
typescript 3.5.3
webpack 4.27.1
$tns --version
6.2.2
The project can be build for Android though.

You should use Schematics for code sharing project which does all the setup for Web and iOS / Android.
If you had created it from template, you might have to manually configure the project to support web.

Related

BPF SDK path does not exist

I'm following the Anchor docs here, but I keep getting this error...
BPF SDK path does not exist: /Users/herbie/.cargo/bin/sdk/bpf: No such file or directory (os error 2)
I ran ls -al /Users/herbie/.cargo/bin and got this output:
total 239152
drwxr-xr-x 17 herbie staff 544 31 Jan 16:55 .
drwxr-xr-x 9 herbie staff 288 13 Dec 11:58 ..
-rwxr-xr-x 1 herbie staff 12574724 31 Jan 16:49 anchor
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo
-rwxr-xr-x 1 herbie staff 7578989 14 Dec 14:05 cargo-build-bpf
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-clippy
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-fmt
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 cargo-miri
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 clippy-driver
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rls
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rust-gdb
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rust-lldb
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustc
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustdoc
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustfmt
-rwxr-xr-x 12 herbie staff 8521112 31 Jan 16:55 rustup
Haven't found much online, and have never heard of BPF before...
It's unclear when you're getting the error during the installation, but here's a few things to try:
be sure that you're using an up-to-date version of Rust stable with rustup update stable
check that you're using the Solana CLI version designated in the docs using solana -V
run cargo build-bpf on the hello world Rust application: https://github.com/solana-labs/example-helloworld/tree/master/src/program-rust
For more reference, BPF is the bytecode format used by on-chain programs with Solana. You can find some more info at the links contained within https://docs.solana.com/developing/on-chain-programs/overview#berkeley-packet-filter-bpf
Try removing the solana cache before running your code. It worked for me. Basically, the BPF SDK hasn't been installed accurately.
rm -rf ~/.cache/solana/*
After deleting the solana cache run. It should download the BPF SDK again
solana build

Sybase 12.5 vs 15.0 client connect libraries: 10x slower insert using 15.0 when inserting into 15.7 ASE

I maintain some legacy code that runs on RH Linux that sends inserts over the network to a client's Sybase. We were using Sybase 12.5 libraries and have just migrated to use Sybase 15.0 client libraries.
My application logs the time at which it sends the insert over the network and also the time it get the acknowledgment back from the target Sybase. When using 12.5 libraries the time was ~5 ms, now with the 15.5 libraries it's roughly 50 ms.
The only change I've made on the application side is to specify the location of the interfaces file on the command line. Previously the file was located in the default location - the location of the Sybase installation. Now it's located where the application is deployed, hence the need to specify the location explicitly.
Would anyone have any idea what is causing the dramatic change in speed, or have hints on where I could look or ideas on how to trace the root cause?
Please forgive the lack of technical details. I'm not a DB admin but a developer using a compiled library to connect to Sybase and don't have access to the nitty-gritty internals. That being said, I'm using the same internal library in both cases, it's only the Sybase librairies that are different.
My Sybase 12.5 and 15 installations look like this:
$ ls -l /opt/sybase/
total 48
-rw-r--r-- 1 root root 555 Jul 2 2019 ASE150.csh
-rw-r--r-- 1 root root 259 Jul 2 2019 ASE150.env
-rw-r--r-- 1 root root 388 Jul 2 2019 ASE150.sh
drwxr-xr-x 10 root root 4096 Feb 2 2017 OCS-15_0
-rw-r--r-- 1 root root 555 Jul 2 2019 SYBASE.csh
-rw-r--r-- 1 root root 259 Jul 2 2019 SYBASE.env
-rw-r--r-- 1 root root 388 Jul 2 2019 SYBASE.sh
drwxr-xr-x 58 root root 4096 Jul 2 2019 charsets
drwxr-xr-x 3 root root 4096 Jul 2 2019 collate
drwxr-xr-x 2 root root 4096 Nov 23 20:55 config
-rw-r--r-- 1 root root 1239 Jul 2 2019 interfaces
drwxr-xr-x 5 root root 4096 Nov 23 20:55 locales
$ ls -l ~/12_5/sybase/
total 28
drwxrwxr-x 4 oadc oadc 4096 Nov 29 2017 OCS-12_5
drwxrwxr-x 58 oadc oadc 4096 Nov 29 2017 charsets
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 config
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 include
-r-xr-xr-x 1 oadc oadc 1184 Mar 16 09:45 interfaces
drwxrwxr-x 2 oadc oadc 4096 Mar 16 09:45 lib
drwxrwxr-x 5 oadc oadc 4096 Mar 16 09:45 locales
EDIT
After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!
$ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library"
Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009
Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009
Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.
I'm not going to go hunt down the idiot that submitted these files into a directory labelled OCS-12-5 ...
After some more digging it looks like the libraries under OCS-12-5 are not actually for 12_5 but for 15_5!
$ strings sybase/OCS-12_5lib/libsybct*.a | grep "Sybase Client-Library" Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64/BUILD1550-003/64bit/OPT/Mon Oct 5 23:16:48 2009 Sybase Client-Library/15.5/P/DRV.15.5.0/Linux x86_64/Linux 2.6.9-55.ELsmp x86_64 Native Threads/BUILD1550-003/64bit/OPT/Tue Oct 6 00:06:57 2009
Which means that my assumption that 12.5 was faster than 15.0 is wrong. What is actually happening is that 15.5 is faster than 15.0. Which makes more sense.
I've updated the question with this new information.

Cannot use compressed archive in yarn resolution

For a typescript stenciljs project I'm working on I was having issues with interactions between rollup-plugin-node-builtins and node-gyp-build which was being used in a dependency. To resolve it I was able to make some changes to the rollup plugin and set it as a custom yarn resolution in stencil
"resolutions": {
"#stencil/core/**/rollup-plugin-node-builtins": "https://github.com/Matthew-Smith/rollup-plugin-node-builtins.git"
}
This works fine when I run it locally, but our build process didn't have git available when we execute yarn install So we attempted to set the resolution to a .tar.gz release of the plugin:
"resolutions": {
"#stencil/core/**/rollup-plugin-node-builtins": "https://github.com/Matthew-Smith/rollup-plugin-node-builtins/archive/v2.1.3.tar.gz"
}
This seemed to properly clone the code into node_modules:
> l node_modules | grep rollup
drwxr-xr-x 8 matthewsmith staff 256B Jan 9 11:26 rollup
drwxr-xr-x 9 matthewsmith staff 288B Jan 9 11:26 rollup-plugin-commonjs
drwxr-xr-x 13 matthewsmith staff 416B Jan 9 11:26 rollup-plugin-node-builtins
drwxr-xr-x 8 matthewsmith staff 256B Jan 9 11:26 rollup-plugin-node-resolve
drwxr-xr-x 7 matthewsmith staff 224B Jan 9 11:26 rollup-pluginutils
> l node_modules/rollup-plugin-node-builtins
total 64
drwxr-xr-x 13 matthewsmith staff 416B Jan 9 11:26 .
drwxr-xr-x 670 matthewsmith staff 21K Jan 9 11:26 ..
-rw-r--r-- 1 matthewsmith staff 36B Jan 9 11:13 .babelrc
-rw-r--r-- 1 matthewsmith staff 650B Jan 9 11:13 .eslintrc
-rw-r--r-- 1 matthewsmith staff 5B Jan 9 11:13 .gitignore
-rw-r--r-- 1 matthewsmith staff 14B Jan 9 11:13 .npmignore
drwxr-xr-x 5 matthewsmith staff 160B Jan 9 11:26 browser-test
-rw-r--r-- 1 matthewsmith staff 500B Jan 9 11:13 build-constants.js
-rw-r--r-- 1 matthewsmith staff 1.3K Jan 9 11:13 package.json
-rw-r--r-- 1 matthewsmith staff 2.5K Jan 9 11:13 readme.md
-rw-r--r-- 1 matthewsmith staff 216B Jan 9 11:13 rollup.config.js
drwxr-xr-x 4 matthewsmith staff 128B Jan 9 11:26 src
drwxr-xr-x 4 matthewsmith staff 128B Jan 9 11:26 test
but when I attempt to build the code I am getting this output:
$ sd concurrent "stencil build --dev --watch" "stencil-dev-server"
[26:41.1] #stencil/core v0.12.4 🏋
[26:41.2] build, app, dev mode, started ...
[26:41.7] transpile started ...
[26:43.8] transpile finished in 2.07 s
[26:43.8] module map started ...
[26:43.8] generate styles started ...
[26:43.8] module map finished in 12 ms
[26:43.9] generate styles finished in 76 ms
[ ERROR ] Cannot find module 'rollup-plugin-node-builtins' at Function.Module._resolveFilename
(internal/modules/cjs/loader.js:580:15) at Function.Module._load
(internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs/loader.js:636:17) at
require (internal/modules/cjs/helpers.js:20:18) at
/Users/matthewsmith/penfield/node_modules/#stencil/core/dist/compiler/index.js:18322:26
at Generator.next (<anonymous>) at
/Users/matthewsmith/penfield/node_modules/#stencil/core/dist/compiler/index.js:18306:71
at new Promise (<anonymous>) at __awaiter$13
(/Users/matthewsmith/penfield/node_modules/#stencil/core/dist/compiler/index.js:18302:12)
at createBundle
(/Users/matthewsmith/penfield/node_modules/#stencil/core/dist/compiler/index.js:18310:12)
Is there a special process to using compressed archives for yarn resolutions?
EDIT
here is what my yarn.lock looks like for this dependency:
rollup-plugin-node-builtins#2.1.2, "rollup-plugin-node-builtins#https://github.com/Matthew-Smith/rollup-plugin-node-builtins/archive/v2.1.3.tar.gz":
version "2.1.3"
resolved "https://github.com/Matthew-Smith/rollup-plugin-node-builtins/archive/v2.1.3.tar.gz#af40f65e716e2c62e698cbea169127f9c1717e7d"
dependencies:
browserify-fs "^1.0.0"
buffer-es6 "^4.9.2"
crypto-browserify "^3.11.0"
process-es6 "^0.11.2"
Yarn Version:
1.12.3
Node Version:
10.12.0
Stencil Version:
0.12.4
So I was able to solve this, though I don't really understand why it worked as a git dependency in the first place.
Looking deeper I noticed that the package.json lists the main as:
"main": "dist/rollup-plugin-node-builtins.cjs.js",
and there is a script to build the package:
"build": "rollup -c -f cjs -o dist/rollup-plugin-node-builtins.cjs.js && rollup -c -f es -o dist/rollup-plugin-node-builtins.es6.js && node build-constants.js",
So I executed build, packaged it via npm pack . and then using that compressed file in my dependency resolutions worked!
NOTE: before learning about npm pack . I tried using tar -czvf and that was giving me the same errors as before.

Location of virtual machines in mac for virtual box

What is the location of all .vbox files that are created in virtual box in a mac. And how can we delete it?
I mistakenly deleted virtualbox.app file from Applications and now I want to delete all the remains of all virtual box files.
I tried following things:
drwxr-xr-x# 3 user admin 102 Dec 19 19:57 vagrant
-rw-r--r-- 1 root wheel 1824496 Feb 21 17:17 com.vagrant.vagrant.bom
-rw-r--r-- 1 root wheel 240 Feb 21 17:17 com.vagrant.vagrant.plist
drwx------ 5 root wheel 170 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815
./private/var/root/VirtualBox VMs/ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815:
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox
-rw------- 1 root wheel 3036 Feb 21 16:59 ubuntu-cloudimg-precise-vagrant-amd64_1487725164672_27815.vbox-prev
lrwxr-xr-x 1 root wheel 24 Feb 21 17:17 vagrant -> /opt/vagrant/bin/vagrant
But I could not find the location of .vbox files to manually delete them.
By default the .vbox files normally go into your users' home directory:
pwd
/Users/Astro58/VirtualBox VMs
total 264
drwx------# 6 lance staff 204 Feb 22 19:03 ./
drwxr-xr-x+ 88 lance staff 2992 Feb 22 16:11 ../
drwx------ 6 lance staff 204 Feb 22 19:50 Laravel_default_1487808229046_76286/
drwx------ 7 lance staff 238 Feb 20 12:53 legacy_default_1487457532080_39585/
You should be able to delete the "VirtualBox VMs" directory via the rm command or via the Mac Finder.

Java classpath in Cocoa

I am developing an application in cocoa which uses some java classes .I need to set the app point to
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0
instead of:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK.
Is it possible to do this..
Thanks in advance
Not a solution, just wanted to point out that your problem (which is I guess that your app does not run with Java6, but needs Java5) may be bigger than you think, because on Snow Leopard, these two directories are the same:
$ ls -la /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
drwxr-xr-x 13 root wheel 442 Dec 5 12:16 .
drwxr-xr-x 12 root wheel 408 Dec 5 12:16 ..
lrwxr-xr-x 1 root wheel 5 Dec 5 12:15 1.3 -> 1.3.1
drwxr-xr-x 3 root wheel 102 Jul 21 2009 1.3.1
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Dec 5 12:15 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 5 Dec 5 12:15 1.6 -> 1.6.0
drwxr-xr-x 8 root wheel 272 Oct 19 10:54 1.6.0
drwxr-xr-x 9 root wheel 306 Dec 5 12:16 A
lrwxr-xr-x 1 root wheel 1 Dec 5 12:15 Current -> A
lrwxr-xr-x 1 root wheel 3 Dec 5 12:15 CurrentJDK -> 1.6
It does seem possible, though, to copy the real Java5 over from a 10.5 installation.

Resources