i am new to ionic2 and not able to create ionic2 app
if i run this command
it will create ionic3
$ npm install -g ionic cordova
i am getting error if i run this command
npm install -g ionic#2.3.0
error
npm ERR! code ETARGET
npm ERR! notarget No matching version found for ionic#2.3.0
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\abc\AppData\Roaming\npm-cache\_logs\2017-07-25T08_11_14_543Z-debug.log
ionic 2.2.3 doesn't exist, after releasing ionic 2.2.0, ionic cli version moved to 3.0.0.
npm install -g ionic#2.2.0 will work.
And to create ionic 2 project you need to change version of ionic-angular in you project, not in ionic-cli.
Ionic framework (ionic-angular) and ionic-cli both are different.
CHANGELOG v2.x.x.
CHANGELOG v3.x.x.
Refer this a link! to know the difference between ionic and ionic-angular and
to create ionic2 refer this a link!
Related
I'm just trying to create a new app from scratch, but getting this error:
Command failed with exit code 1: npm install --loglevel error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ember-sample#0.0.0
npm ERR! Found: ember-cli#4.3.0
npm ERR! node_modules/ember-cli
npm ERR! dev ember-cli#"~4.3.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer ember-cli#"~3.2.0" from ember-cli-dependency-checker#3.3.0
npm ERR! node_modules/ember-cli-dependency-checker
npm ERR! dev ember-cli-dependency-checker#"^3.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
These are the repro steps:
open command prompt in Win11.
install ember
npm install -g ember-cli
create app ember-sample
ember new ember-sample
and just after that I get the error above.
Could I be missing anything? I have already installed node v16.14.2, npm 8.5.0, ember-cli: 4.3.0
I was already taking a look on ember.js official website
Actually Ember CLI is Compatible with NodeVersion 12. You might be using a later node versio like 14 or 16. My problem is solved when I downgraded to Node 12 lts
A fix is on its way. You could follow what #NullVoxPopuli said in the comments.
https://github.com/quaertym/ember-cli-dependency-checker/issues/132
I am trying to add fcm plugin in my project but it shows following error
ionic cordova plugin add cordova-plugin-fcm
> cordova plugin add cordova-plugin-fcm --save
Error: Failed to fetch plugin file:node_modules/cordova-plugin-fcm via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963238 Error output:
npm ERR! addLocal Could not install F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm
npm ERR! Windows_NT 10.0.16299
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "file:node_modules/cordova-plugin-fcm" "--production" "--save"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! path F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm'
npm ERR! enoent ENOENT: no such file or directory, open 'F:\PROJECTS\IONIC2\foodJunctionMobileApp\node_modules\cordova-plugin-fcm'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! F:\PROJECTS\IONIC2\foodJunctionMobileApp\npm-debug.log
here is my
ionic info
cli packages: (C:\Users\Rohit\AppData\Roaming\npm\node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.1.6
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 25.2.5
Node : v6.9.5
npm : 3.10.10
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\Rohit\AppData\Local\Android\sdk
Misc:
backend : pro
I am connected to the internet so that is not the problem. I have added google plus plugin before installing fcm and that time it was conflicting with fcm plugin so I removed google plus plugin and tried to install fcm only but failed.kindly help if anyone knows about it. Thank you.
I use this firebase plugin:
https://www.npmjs.com/package/cordova-plugin-firebase
This is how you can install it :
cordova plugin add cordova-plugin-firebase#0.1.24 --save
It also works with the lates ionic version.
you can follow this tutorial, it explains all the errors that you can get during the process, hope this helps.
https://www.djamware.com/post/58a1378480aca7386754130a/ionic-2-fcm-push-notification
I've been using Zurb Foundation for Emails successfully for quite some time. Suddenly the build process is failing.
I updated to Node 7.7.2 and NPM 4.1.2, deleted the node_modules directory and ran npm install to reinstall the dependencies, but it didn't solve the issue.
$ npm run build
foundation-emails-template#1.0.0 build /Users/[REDACTED]
gulp --production
[12:46:56] Requiring external module babel-register
[12:46:57] Using gulpfile ~/[REDACTED]/gulpfile.babel.js
[12:46:57] Starting 'default'...
[12:46:57] Starting 'build'...
[12:46:57] Starting 'clean'...
[12:46:57] Finished 'clean' after 11 ms
[12:46:57] Starting 'pages'...
[12:46:59] Finished 'pages' after 1.32 s
[12:46:59] Starting 'sass'...
[12:47:05] 'sass' errored after 6.91 s
[12:47:05] Error in plugin 'gulp-uncss'
Message:
Unexpected EOF
Details:
domainEmitter: [object Object]
domain: [object Object]
domainThrown: false
[12:47:05] 'build' errored after 8.25 s
[12:47:05] 'default' errored after 8.25 s
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v7.7.2
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! foundation-emails-template#1.0.0 build: `gulp --production`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the foundation-emails-template#1.0.0 build script 'gulp --production'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the foundation-emails-template package,
npm ERR! not with npm itself.
Or if I try to run gulp --production by itself:
$ gulp --production
[12:29:38] Requiring external module babel-core/register
[12:29:39] Using gulpfile ~/[REDACTED]/gulpfile.babel.js
/usr/local/lib/node_modules/gulp/bin/gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot read property 'apply' of undefined
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:19
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
npm start works as expected; I just can't inline the styles.
Any ideas? TIA.
It's because the node environment had changed.
Run this in your console:
npm rebuild node-sass
npm rebuild gulp-uncss
It should fix the issue.
I got the same error and was caused by a code-specific issue so make sure all your code is valid. In my case I was missing a closing " on a class.
I'm trying to update my current ionic version 2.0.0-beta.32 to the latest version.
1) I runned the command : sudo npm install -g ionic
2) I runned the command : npm outdated
Package Current Wanted Latest Location
#angular/common 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/common
#angular/compiler 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/compiler
#angular/core 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/core
#angular/forms 0.2.0 0.2.0 2.4.8 #angular/forms
#angular/http 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/http
#angular/platform-browser 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/platform-browser
#angular/platform-browser-dynamic 2.0.0-rc.4 2.0.0-rc.4 2.4.8 #angular/platform-browser-dynamic
angular2-jwt 0.1.17 0.1.17 0.1.28 angular2-jwt
del 2.2.0 2.2.0 2.2.2 del
es6-shim 0.35.0 0.35.0 0.35.3 es6-shim
gulp-watch 4.3.5 4.3.5 4.3.11 gulp-watch
ionic-angular 2.0.0-beta.10 2.0.0-beta.10 2.0.1 ionic-angular
ionic-native 1.3.2 1.3.2 2.5.1 ionic-native
reflect-metadata 0.1.3 0.1.3 0.1.10 reflect-metadata
run-sequence 1.1.5 1.1.5 1.2.2 run-sequence
rxjs 5.0.0-beta.6 5.0.0-beta.6 5.2.0 rxjs
zone.js 0.6.26 0.6.26 0.7.7 zone.js
3) then I runned the command : sudo npm install ionic-angular#latest. Here I got this error :
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "ionic-angular#latest"
npm ERR! node v4.2.0
npm ERR! npm v2.14.7
npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package #angular/common#2.0.0-rc.4 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer #angular/forms#0.2.0 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/platform-browser#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer #angular/platform-browser-dynamic#2.0.0-rc.4 wants #angular/common#^2.0.0-rc.4
npm ERR! peerinvalid Peer ionic-angular#2.0.1 wants #angular/common#2.2.1
npm ERR! peerinvalid Peer #angular/platform-server#2.2.1 wants #angular/common#2.2.1
npm ERR! Please include the following file with any support request:
npm ERR! /Users/macbookpro/Desktop/ThePennyInc/penny-mobile-app/npm-debug.log
Any help please !
There have been a lot of breaking changes from beta to the latest ionic version including file structure and app scripts.
Check here fro steps to upgrade from Beta version. Though it says to RC0, you could follow the steps to upgrade your project by starting a new project and copying the files.
There may be errors in the code due to breaking changes in different versions.
To verify,
Here is the latest package.json for the current ionic version.
unable to install ionic 2
Successfully Installed ionic2#beta using
sudo npm install -g ionic#beta
ionic -v shows version 1.7.14
Uninstalled using npm uninstall -g ionic
Successfully (based on printout) uninstalled ionic 2
ionic -v shows version 1.7.14 (WTF)
Tried npm uninstall -g ionic again
Received command prompt immediately, no other outputs (no affect)
ionic -v shows version 1.7.14
You have 2 choices.
As comment suggests do:
sudo npm install -g ionic#beta
You will have to do this for every global command as you dont have permission to the folders.
Or
Check npm fix permission issue
You can change the global node module directory of npm so that you wont need permission. You can also use app like homebrew to set up your node.