Loopback lb-ng (LoopBack Angular SDK command-line tool) not working - loopbackjs

I'm going through the tutorials of http://docs.strongloop.com, and I've reached http://docs.strongloop.com/display/public/LB/Add+a+client+app.
Yet when I execute 'lb-ng ../server/server.js js/lb-services.js' I get an error: Cannot find module 'loopback'.
Any help would be appreciated!

For the new version of loopback you need to install lb-ng command with this line of command
sudo npm install -g loopback-sdk-angular-cli
also try to be in the client folder make sure that you have js directory in client directory then execute these lb-ng commad
lb-ng ../server/server.js js/lb-services.js
it will work
:)

did you npm install your dependencies? check and see if you have a node_modules dir in your project root.

if you're using a newer version of node, try uninstalling node and reinstalling an LTS version.
npm uninstall -g strongloop
npm cache clear
npm install -g strongloop
This is how I fixed this problem for me.

install strong loop and then run lb-ng command this is how i fixed this problem

Related

module not found error when running the npm start command

I successfully installed the node js globally in my machine but when running the localhost its not working. i also tried reinstalling it several but didn't worked.
when running the npm start the following error has came up.
anyone please tell me how to solve this. thanks in advance
Output of the npm start
Try run npm i first.
This will install all necessary dependencies.
Make sure to run npm start after you go into your frontend folder: cd frontend

pm2: command not found after npm -g

I have installed pm2 with the following command
npm install pm2#latest -g
This worked OK, and I am now running production services used pm2.
I exited the shell ( AWS ) and now if I try pm2 list I get error:-
pm2: command not found
I think the issue might be that I SHOULD have run sudo npm install pm2#latest -g
From previous stackoverflow answers I can see this is the suggested approach, but my question is this.....
If I now run sudo npm install pm2#latest -g will this impact my currently running pm2 services ?
Thanks
I belive the problem is that you haven't add the npm global directory to your sell path
Check this guide:
https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md
TLDR:
What you want to do is to get your npm prefix dir by executing
npm config get prefix
then your pm2 is in <YOUR_NPM_PREFIX>/bin/pm2
To add your npm global user dir to your shell PATH, you can put this commad
export PATH="$PATH:<YOUR_NPM_PREFIX>/bin"
in your .bashrc, don't forget to re-login your shell or source ~/.bashrc if you're using bash

AWS Linux Server install R package

I try to install the package "data.table" (and "aws.s3)" via Rstudio Server on an Amazon Linux instance following this guide:
http://stanke.co/category/r/
Unfortunately, I get the following error message. I really don't know what else to do.
Can anybody help? I installed devtools and I am able to install other packages such as xml2, devtools and deplyr.
I had the same issue on AWS and already fixed.
You need first install gcc64 and openmp shared support library.
sudo yum install gcc64
sudo yum install libgomp
Then under your user home create an .R folder with a Makevars file in it, with the following content (it will tell to R which compiler to use):
CC = /usr/bin/gcc64
CXX = /usr/bin/g++
SHLIB_OPENMP_CFLAGS = -fopenmp
I hope it's working for you as well ...
You need to install dmlc-core.
This link will provide more information:
A common bricks library for building scalable and portable distributed machine learning
based on https://github.com/RcppCore/RcppArmadillo/issues/200, I think this issue is due to a g++ compatability issue. It might also explain why when I installed devtools it kept giving me [-Wdeprecated-declarations]
so run:
sudo yum remove gcc72-c++.x86_64 libgcc72.x86_64
yum install R-devel
Then you should be able to run the installation command.

Ionic CLI not uninstalling

This is related to my previous question here which was never resolved. I am trying to fix the problem by doing a fresh reinstall of Ionic.
I first tried uninstalling Ionic with sudo npm uninstall -g ionic, and it completes with no errors, but doing ionic -v still outputs 2.1.1, so obviously it didn't really get uninstalled. After that I tried sudo npm install -g ionic#latest, and my problem still persists.
What is even weirder is what happened when I tried to create a new project from scratch to test it. I did ionic start test --v2 on my Ubuntu machine, and doing ionic serve still does the same thing that I stated in my previous question.
npm uninstall -g ionic
npm uninstall -g #ionic/cli
finally i was able to uninstall with this...
I had the same issue for resolving this
Run npm uninstall -g ionic
Go to the location "/usr/local/bin/"
Delete Ionic File
Close terminal
Open new terminal and run "npm uninstall -g ionic"
Now run "ionic -v"
This probably happens due to multiple installations of ionic in your machine, more so this happens on windows.
Run:
"where ionic" in your command prompt
if it does not work try :
"which ionic" !! (probably linux)
This will give you the location of your installed ionic, in windows its mostly ..Local\AppData\Roaming.. somewhere.
Go to that location delete ionic and ionic.cmd file there.
Run: ionic -v now, make sure it gives you an error.
Be Happy if you see error.
run: npm install ionic#latest -g now
Run: ionic -v, make sure you see your latest ionic version there.
Be more happy now.
Uninstall cordova and ionic.
npm uninstall -g cordova
npm uninstall -g ionic
Then check to make sure you have the right version:
ionic -v
Use this command please
npm uninstall -g #ionic/cli
What is your node and npm versions ?
Please update latest node js (https://nodejs.org/en/download/current/)
then check that
node -v
npm -v
Node version must be v8.5.0 (includes npm 5.3.0) and then
sudo npm uninstall -g ionic
sudo npm cache clean --force
sudo npm install ionic
check the ionic version
ionic -v
version will be ^3.10.1. If everything is ok you can use new project command as given below
ionic start --list
you can see what kind of project types here as an example
ionic start blank
You can try running the command as below, it worked for me:
sudo npm uninstall -g #ionic/cli
If you are checking the ionic version inside project folder then
try to remove the ionic cli without -g option. It may be possible that you have installed local version of ionic inside project.
If you're using nvm, remember to delete ionic from where ionic. I deleted it via nvm uninstall {{version}}.

Ember Cli on windows

I m trying to get Ember cli on Windows 7.I have installed node and npm.
But when I type npm install -g ember-cli I get the following error.Is there anything that I am missing?
Try running:
npm package.json
to see errors in the package.json file. Otherwise try:
npm cache clean