ERROR:The serve command requires to be run in an Angular project, but a project definition could not be found - github

I am trying to clone the git repository for Tour of Heros with NgRX (blove/ngrx-tour-of-heros)
However, I can not seem to run the application.
I have updated my Angular cli to 7.3 I have installed yarn to try and help as well as tried to create a new application and remove files to drag and drop files that where not there like the node modules, and I am still getting this error.
How do I get this error removed so that I can see the file?

Check your build per-requisites, as illustrated by blove/ngrx-tour-of-heros issue 2
Breaking changes - node => 10
ERROR - "json-server requires at least version 4 of Node, please upgrade"
if your node -v is greater than 10, npm upgrade json-server
Appears that node-sass was optional on yarn install.
Had to install separately - yarn add none-sass
Also, cd client and cd server are reversed in lines 13 and 15.

The angular project is in de client directory, so after cloning the repo you have to get into the client directory before running the ng serve command:
git clone https://github.com/blove/ngrx-tour-of-heros.git
cd ./client
yarn install
npm run start
Seems like it's an older repo with Angular v5 and CLI v 1.6 - try downgrading if it doesn't work. https://github.com/blove/ngrx-tour-of-heros/blob/master/client/package.json#L32

Related

"Fixing missing packages and vulnerabilities in age-viewer package when installing from GitHub"

I am trying to install the age-viewer from GitHub by following these steps:
Cloning the repository
Changing directory to age-viewer
Running "npm run setup"
However, I am encountering issues with missing packages and 34 vulnerabilities (3 moderate, 22 high, 9 critical). I have attempted to resolve this by running "npm audit fix --force", but it did not work.
I am looking for a solution to fix the missing packages and vulnerabilities in the age-viewer package that I am trying to install from GitHub.
Cloning the age-viewer repository from GitHub
Changing directory to age-viewer
Running "npm run setup"
Running "npm audit fix --force" to resolve issues with missing packages and vulnerabilities
I encountered a similar error. Here is how I solved it:
Removed node_modules directory from root, frontend and backend folders.
Removed package-lock.json from root, frontend and backend folders.
Ensured node version is in range 14.16.0 - 14.21.2 (I switched to 14.16.0 using nvm)
Cd to root dir of the AGE-Viewer
npm run setup
npm run start
Hope this helps.
This error can arise due to a different reason. You can try some of the following steps to solve this error.
Try using node version 14.16.0.
If you are using WSL then make sure that the node version for your system's parent os and WSl is the same.
I had the same issue while installing, the 1st solution mentioned above worked for me [for ubuntu 22.04].
Try to use 14.16.0 version of node.
But if you are already using this version then try these steps:
npm cache clean --force
delete node_modules folder and package-lock.json file from your age-viewer root
directory.
delete node_modules folder and package-lock.json file from the frontend folder in age-viewer directory.
delete node_modules folder and package-lock.json file from the backend folder
in age-viewer directory.
npm run setup
npm run start
It works for me like this.

npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher

I am getting this warning from github on my npm project build process...
I tried searching on the internet and also read the blog link posted by github - but I could not find the solution to it anywhere. Am I missing something ?
Warning seen
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher. You are currently using plaintext http to connect. Please visit the GitHub blog for more information: https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/
After updating your NodeJS and NPM Version run this command in CLI
npm set registry=https://registry.npmjs.org/
Save your Life, Thanks me Later :D
I can solve the issue by the way:
First Step: npm set registry=https://registry.npmjs.org/
Second Step: npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
Besides updating your version of node to an active or current LTS you want to ensure your NPM registry is set to an HTTPS endpoint:
registry=https://registry.npmjs.org/
You are facing that issue because your registry is set to HTTP version which is a bit insecure so the first thing that you should do is to put it to HTTPS version by running the following command below
npm set registry=https://registry.npmjs.org/
Then, after that you have to make sure your version of npm supports TLS 1.2, you can install a test package from an HTTPS endpoint that already has TLS 1.0 and TLS 1.1 disabled: by running this command below
npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
You should see the following message:
Hello! The tls-test package was successfully downloaded and installed. Congratulations! Your package manager appears to support TLS 1.2.
If you don't see the message, don't worry you can try to install the package again, hope it will work out for you
Please make sure that you have latest(or somewhat recent) version of node installed on your system
To make sure that your version of npm supports TLS 1.2, you can install a test package from an HTTPS endpoint that already has TLS 1.0 and TLS 1.1 disabled:
npm install -g https://tls-test.npmjs.com/tls-test-1.0.0.tgz
You should see the following message:
Hello! The tls-test package was successfully downloaded and installed.
Congratulations! Your package manager appears to support TLS 1.2.
If you didn't see the above message, try to install some npm package.
If you didn't see the npm notice, you're good to go. If you happened to see again, please run the below command too.
npm set registry=https://registry.npmjs.org/
Source: The npm registry is deprecating TLS 1.0 and TLS 1.1
You are facing this issue because of your registry is still set to http version and that causing you this error. All You need to do is just Run following command in your terminal.
npm config set registry https://registry.npmjs.org/
and that is it!
now you can run any npm command
Well, I had several problems with node and npm. The one described in this question was only the last one.
I was not able to execute npm install, the node_modules were partially downloaded and at the end of the execution they were all deleted (the folder was visible, but it was deleted after running the command).
First problem: --location=global
First, I was getting this error message:
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead
Which I solved by following these instructions: https://stackoverflow.com/a/72592742/7389293
Apparently that allowed me to update to:
node -v: c16.16.0
npm -v: 8.17.0
Today's date: August 13, 2022.
Second problem: use TLS 1.2 or higher
Then, I still was having the error described in this question, which didn't allowed me to install the node_modules folder in my project:
npm notice Beginning October 4, 2021, all connections to the npm registry - including for package installation - must use TLS 1.2 or higher
The selected answer to the question made in the present screen your reading, finally fixed the problem: https://stackoverflow.com/a/70555822/7389293
After all of this I was able to run npm again, install all the packages from the package.json file, and run the website normally in the browser.
maxtimeout didn't work for me
so I tried converting to yarn by npm I -g yarn
and then yarn install in the root directory of the project(where I have to install the node_modules)

error: SERVER does not appear in AM_CONDITIONAL

I am trying to install Lustre on CentOS 7. I followed this link. When I try to run sh ./autogen.sh to generate the configure script I get the above error as illustrated below.
[root#localhost lustre-release]# sh ./autogen.sh
configure.ac:10: installing 'config/config.guess'
configure.ac:10: installing 'config/config.sub'
configure.ac:12: installing 'config/install-sh'
configure.ac:12: installing 'config/missing'
autoMakefile.am:127: error: SERVER does not appear in AM_CONDITIONAL
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
Does anyone know how I can resolve this?
To build lustre from git use "autogen.sh" in the top level directory to setup the build environment:
$ bash autogen.sh
libcfs/libcfs/autoMakefile.am: installing 'config/depcomp'
$
Did you try downloading a pre-built package from https://downloads.whamcloud.com/public/lustre/ ? That is usually the easiest compared to building your own.
If you want to build your own Lustre code, which version of the source are you using? The latest code is available at git.whamcloud.com. Most users should use the LTS release (b2_10 branch currently), but if you are doing new development you should use the master branch.

jspm hot reloading install - command not found after global install

i try to install the hot reload module of jspm using the chokidar-socket-emitter. Installation works like charme, but after that it is not possible to start the watch task as described here: http://jspm.io/0.17-beta-guide/hot-reloading.html
Here is my install log:
XXXXXMacBookPro:dasding xxxxxx$ sudo npm i -g chokidar-socket-emitter
\
fsevents#1.0.12 install /usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents
node-pre-gyp install --fallback-to-build
[fsevents] Success: "/usr/local/lib/node_modules/chokidar-socket-emitter/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v14-darwin-x64/fse.node" is installed via remote
chokidar-socket-emitter#0.3.1 /usr/local/lib/node_modules/chokidar-socket-emitter
├── socket.io#1.4.6 (has-binary#0.1.7, debug#2.2.0, socket.io-parser#2.2.6, socket.io-adapter#0.4.0, engine.io#1.6.9, socket.io-client#1.4.6)
└── chokidar#1.5.2 (path-is-absolute#1.0.0, inherits#2.0.1, glob-parent#2.0.0, async-each#1.0.0, is-binary-path#1.0.1, is-glob#2.0.1, readdirp#2.0.0, anymatch#1.3.0, fsevents#1.0.12)
XXXXXMacBookPro:dasding xxxxxx$ chokidar-socket-emitter
bash: chokidar-socket-emitter: command not found
XXXXXMacBookPro:dasding xxxxxx$
Does anyone has any idea why he is unable to find the command? i have no idea how to fix this, global installs always used to work without any problem.
thanks in advance
Ok, in case someone faces the same problem - my current node.js installation was unable to handle the latest version of chokidar-socket-emitter, so a lower version was installed, but the docs refered to the latest version, so there never was a command that could have been found. after updating my node.js installation everything worked like charme.

Cordova 3.0.0 - How to install a plugin

I'm totally new to app development and just started to make my first steps.
I've installed Cordova and the needed utilities according this guide.
I've created my first app (using Cordova's create script) and I'm able to run it on my Nexus 4.
Now I tried to install a plugin using plugman, and I'm stuck.
This tutorial says I can install a plugin using
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
in the application directory.
Two issues here:
1. In the application directory itself isn't a executable file named "cordova"
2. When I swtich to the cordova directory and execute the mentioned command, I get this error:
Cordova does not recognize the command plugin
Any ideas what I'm doing wrong? Or is ther a mistake in the tutorial?
Thanks a lot for any help!
EDIT:
I managed to install the plugins using plugman directly using
plugman install --platform android --project . --plugin
https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git
But nevertheless I'm still interested in how to install the plugins using cordova...
Below are several ways I've used to install plugins from Cordova CLI, hope it helps:
Firstly, make sure you've installed cordova correctly(please refer to official document if needed):
cordova -v // should print something like "3.5.0-0.2.6"
Install from Cordova plugin registry
cordova plugin add org.apache.cordova.device
This should cover most cases and here is a list of plugins available in Cordova Plugin Registry.
Install from a remote repository, typically from GitHub
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin
If you encountered something like "Error: Command failed: error: Failed connect to help.github.com:443; Connection refused while accessing", typically it's a proxy issue, you could retry after config your proxy:
git config --global http.proxy http://user:password#proxy:xxx
If it still not works, you could click "Dowload Zip" from github, unzip the downloaded file and then:
Install from a local directory
cordova plugin add /path/to/directory
It will look in this directory and each of its subdirectories for the plugin.
NOTE: this is related to Android platform of cordova 3.4 on my windows 8 machine (tested)
step 1=> Install plugman by command in cmd "npm install -g plugman" (note that you must have node installed)
step 2=> Download git from http://msysgit.github.com/ for windows (15 mb) install exe file
step 3=> create new variable in enviorment variable name = GIT_PATH and value= "C:\Program Files (x86)\Git (this is mine urs may be diff)", now append %GIT_PATH% in Path variable (very Important) check git command in cmd if no error than continue otherwise fix this now
step 4=> Now go to http://plugins.cordova.io/#/ find whatever plugin want to install. and get just this repository url like
step 5=> now whatever and anywhere project is, place following command in cmd
**plugman install --platform android --project F:\my17app\ --plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git**
Step 7=> If it successfully install we can see in app/res/xml/config.xml file a new feature will be added with id of new plugin
PS: For environment variables see in control Panel=> System and Security => System =>Advanced System Security
I did it in this manner
D:\phonegap\hello>plugman install --platform android --project D:\phonegap\hello
\platforms\android --plugin org.apache.cordova.battery-status
where as for doing it from git
plugman install --platform android --project D:\phonegap\hello
\platforms\android --plugin https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git