Update Ionic in the existing project - angularjs

I was excited to see the Release version of Ionic, but found myself unable to update my existing project. Here is what I did.
run npm install -g ionic
Open bower.json in your App's root folder (the one above www)
You will find something like this here:
{
"name": "MyAppName",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#xxxxxxxx"
}
}
Change it to this (basically by changing the last line:
{
"name": "MyAppName",
"private": "true",
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.0.0-rc.1"
}
}
Save the file
Go to command line and run this in your App Folder
bower update
ionic lib update
Run ionic lib to check the version number
Edit
This post relates to Windows OS, as I am using 64 bit Windows 7.

I also had a lot of problems to update an existing ionic project. This is what I did to solve the issue:
Remove bower.json from www/lib/ionic
Execute ionic lib update from the source project.
This action will ask for confirmation, just type yes and your project will be updated to the latest version.

You need not touch the bower.json file.
After npm install -g ionic, be in the root folder of your app and run this command:
ionic lib update
This will prompt you if you want to upgrade your project's Ionic version, i.e download and copy the new Ionic libraries.

I upgraded my ionic project from ionic v1.0.1 to v1.1.0 to by upgrading the command line tool with npm and then generating a start project to see what changed. Here's exactly what I did:
npm uninstall -g ionic
npm install -g ionic
Then ionic start tabsAppX tabs to create a starter project. When I compared it to a starter project created from the previous version of ionic, I saw that only the www/lib/ionic folder changed (to the newest version). So I simply copied that into my actual project and ran gulp scss to update my css files.

Here is what I did while using version 1:
Created a new project
Deleted all the content of www folder
Copied all the content of my earlier project
Pasted there in the new project
Make a point while doing ionic start old-project-name --type ionic1 keep the old-project-name to not to cause any problem later on

Related

reactjs application add to existing reactjs application

I'm just starting out in Reactjs.
I have a RedHat Linux VM.
I've installed nodejs and created a simple reactjs application:
npx create-react-app my-first-project
My first project works OK.
Now I have found this great reactjs package with a demo:
https://github.com/TarikHuber/material-ui-filter
I want to install the demo part of this package that consists of index.css, index.html, app.js, index.js
How would I go with this?
Where do I put this new code relative to my-first-project?
How do I call this new code?
The package I think calls redux so I assume I will install this first.
Thanks.
You should learn how npm works. If you find some cool package and you want to use it then you have to install that package. There is a installation command on Readme file on that github repo. Install package via npm install material-ui-filter then you can just use the html file on demo project.

Moved my React Native project folder to a new machine, how do i get it to run?

I recently cloned my React Native project folder from GitHub to my new/unused Mac. I am now in the root directory and when i run "react-native run-ios" to get the project going and load up the phone simulator, i get -bash: react-native: command not found
Do i need to re-install EVERY single dependency in package.json again (because it seems they're all there in my folders)?
Whats's the minimum in need to get my project up and running again and what commands do i use with my current project. I don't want to have to 'react-native init' an entirely new project!
Thanks
If you haven't done any react-native work on the Mac, then yes, you need to install all the dependencies including the react-native cli. You don't have the cli for react-native installed and you are trying to use it. You need to install react-native cli and NPM and make sure all dependencies are there.

Cannot create a new reactJs application

Enter image description here I tried to create my first react js projet, but the generated file is deleted automatically
Here is the steps that I followed:
installed node js
installed npm
installed CRA
But, the generated file of my project is automatically deleted
Solution 1:
just try this command :
"npm cache clean --force"
Solution 2: only windows OS
on windows OS go to you AppData file and delete npm-cache directory :
C:\Users\userName\AppData\Roaming\npm-cache
And re-run you create-react-app .

Create and Publish a node_modules package without it's own node_modules

I had created a project using ReactJs and Material UI
And then I was building and publishing the whole project
When I want to install this module in client-side with
npm install clientsso/BuildTest
it workes fine, but it comes with its own node_modules folder
so I force build to create a single file in another folder and i publish this folder
build": "./node_modules/.bin/babel src --out-file BuildTest/index.js
but when I re-install, it always asks for "Material UI", modules used by this custom package
is there any solution to force the client to install all necessary modules for this package
in his folder "./node_modules/BuildTest"
Thanks for your help

Expo 33 yarn workspaces - Callback with id 0: undefined.undefined() not found

I have this project, was created with the latest version of expo and typescript, (I chose it from the cli).
Everything works well, also I added it with the expo-yarn-workspaces package, but I have this error when I try to scan the QR code with my android phone:
In packages/app you can find the react-native code...
I haven't added any logic to this app, it's only the default template that expo-cli creates.
This problem was a serious headache. Fortunately, I think I've got the fix for you.
Check the node_modules folder of your mobile application and ensure expo and react-native are both symlinked to the workspace-root's versions of these packages. In my case, the mobile application had a second copy of react-native rather than being symlinked, which was the cause of my trouble.
Edit - More clarity:
TL:DR If your react-native and expo folders inside of your mobile app's node_modules folder are not symlinked, delete them and rerun the expo-yarn-workspaces postinstall from the folder for your mobile app, NOT from the project root. These modules should only appear in the top level node_modules folder.
Example Project structure
/MyRoot
/node_modules
/react-native
/expo
/packages
/YourMobileApp
/node_modules
/react-native -- This should be a symlink to /MyRoot/node_modules/react-native
/expo -- This should be a symlink to /MyRoot/node_modules/expo
/SomePackage
/SomeOtherPackage
Example of what properly symlinked folders look like (Windows 7)

Resources