Update IONIC not working - ionic-framework

I would like some assistance with IONIC. My update is not working. I have tried the following command:
ionic lib update
The result of this command is as follows:
http://i.imgur.com/jtT6af3.png
I believe the problem lies in the fact I am not in the www directory. I would like to know how to locate the www directory.
Any assistance is appreciated. Thanks

You do not need to be in www folder, if you want to update ionic libraries of your project then go to your ionic project folder and run
ionic lib update
But if you want to update your ionic package then run this command anywhere
sudo npm update -g ionic
In case of windows os npm update -g ionic

Related

flutterfire configure not working even after installing via npm, and relogging

I keep getting this error no matter what I attempt to do,
I've already tried using "npm install -g firebase-tools",
and "firebase projects:list" displays a correct list of my current projects.
Looking for help as I have sunk countless hours into this problem without being able to move a step forward.
FirebaseCommandException: An error occured on the
Firebase CLI when attempting to run a command.
COMMAND: firebase --version
ERROR: The FlutterFire CLI currently requires the official Firebase CLI to also be installed, see https://firebase.google.com/docs/cli#install_the_firebase_cli for how to install it. ```
In case you have installed (and renamed) firebase.exe from the windows installer, remove that first.
The installation of npm install -g firebase-tools and the windows installer are conflicting with each other.
Then go through firebase logout and firebase login again before running flutterfire configure.
I added the firebase-tools file downloaded from https://firebase.tools/bin/win/instant/latest in the root of the directory of my project and it works for me. I changed the name to firebase only.

TNS command not found after installing NativeScript

I updated NPM and Node before installing NativeScript, without errors I might add, but when I attempt to create a new project using tns create MyProjectName, I get the error tns command not found.
After much reading, I'm getting the feeling it has something to do with my PATH.
This is what is outputted in terminal during the NativeScript install regarding TNS:
sudo npm install -g nativescript --unsafe-perm
/Users/martingeldart/.npm-global/bin/tns -> /Users/martingeldart/.npm-global/lib/node_modules/nativescript/bin/tns
/Users/martingeldart/.npm-global/bin/nativescript -> /Users/martingeldart/.npm-global/lib/node_modules/nativescript/bin/tns
...
If I run echo $PATH, this is what outputs:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/bin/lib/node_modules/nativescript/bin
Which looks really odd to me but I'm no command line expert by any means. In fact, I'm incredibly inexperienced with the whole command line system.
Why am I not able to access the tns command? What is going on with that PATH I echoed?
MacOSX
Between version of npm the location of the global package moved location in the OS. Since the installation has moved the terminal does not know where to find the command. The PATH variable is used to tell the terminal where all the command may be located. In this case this seems a standard.
Now the best way to access command from an installed package is to use npx which is included by default with the new installation of npm.
https://docs.npmjs.com/downloading-and-installing-packages-globally
npx tns
# In your case
npx tns create MyProjectName
There 2 other ways to resolve this.
Either your global package folder is not set up correctly.
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
Add the bin folder where nativescript was install to your path manually (usually in .bash_profile), open a new terminal.
I use nativescript for various project and I have a suggestion for package management. Usually I avoid installing global package because in case of multiple project there may be conflict between version if some project are updated and other not.
I usually create a folder with the version I am installing. Go to the folder, npm init and install locally the package.
mkdir nativescript-project-6-0
cd nativescript-project-6-0
npm init
npm i --save nativescript
Now I have a fix version to work with and can create other project with the same version even if I have other project with newer version of the tool or lib. Now in nativescript-project-6-0 I create my project.
npx tns create MyProjectName
This should create a folder nativescript-project-6-0/MyProjectName. All set and ready to go. Remember that is is always a good idea to use npx in this case since we want to use the local package.

Ionic Serve throws a Type-Error: Appscripts.serve

I recently cloned a project and when I tried to serve it, I got an error:TypeError: AppScripts.serve is not a function.
How would I go about fixing this issue/where should I look?
I have already tried updating ionic, and reinstalling all plugins(just in case).
Assistance on this would be greatly appreciated !
Execute this command:
npm install --save-dev #ionic/app-scripts#latest
After that your app should work using
ionic serve
This is the same as mine when trying serve old project in updating Ionic3, all gonna error something like that, but when start a new project again its gonna work well
Running this command works for me
npm install --save-dev #ionic/app-scripts#latest
and then
ionic serve
I face the same issue when i started developing old ionic 2 project with ionic 3.
follow the following steps works for me :
npm cache clear
delete the node-modules folder
npm install
npm install --save-dev #ionic/app-scripts#latest
ionic serve

Using an NPM module from Ionic

I am using ionic 1.3.1 and I want to use the npm phone module here to validate phone numbers on the client side.
In looking around on how to use the npm module, I followed instructions in this SO post (last answer at the bottom) and copied the phone directory from npm_modules to www/lib. I then included the lib/phone/lib/index.js file in my index.html.
When I bring up the page with ionic serve I get the error "module not found".
I see solutions for using npm in Ionic v2 but am not ready to move to v2 yet. I also see some answers pointing towards using Browserify but I am trying to avoid having to use new tools if I don't need to - feels like there must be a simple way to use an npm module inside ionic.
Thanks for any pointers to help resolve.
Sanjay
Since I couldn't figure this out I just created an Angular service from the code in the index.js file for the npm phone module.

You have to be inside an ember-cli project in order to use the serve command

I done a git clone of ember-cli, and then done this:
cd ember-cli
npm link ember-cli
ember server
but get
You have to be inside an ember-cli project in order to use the serve command.
any ideas?
EDIT___________________________________________
I got round this by just reinstalling it again.
While you are inside the ember-cli directory, you are not inside of an actual ember-cli project which is why ember server does not work. I'm not sure what you are trying to do, but if you are trying to create an ember-cli project you can do these commands outside of that ember-cli directory:
ember new foo
cd foo
npm link ember-cli
ember server
If you use app name as ember-cli, emberCli, you will get this error. These words are reserved words.