Ionic ERROR: version.json FILE_NOT_FOUND - ionic-framework

I am new to ionic. Can anyone please help me solve the following error:
[WARN] Error with .\WWW\lib\ionic\version.json file: FILE_NOT_FOUND, trying .\bower .json

This worked for me, just run the following within the ionic repo:
rm -rf resources/android
ionic cordova resources

Related

IONIC 5 ionic serve produces Error: NGCC failed

I created a new ionic 5 project by using
ionic start myApp blank
When I run the project in browser using ionic serve it has given the following error
Error: NGCC failed
I figured out the problem my self
The problem was when I was installing the latest npm packages
it was installing the typescript: 4.0.2 and thats why the NGCC error
occured
run the following command and it will work,
npm i typescript#">=3.9.2 <4.0.0”
Or in future some one faces this error this is about the typescript version so just install the valid typescript and you will fix the ngcc error

Ionic4 Unknown browser query

I have practised Ionic a lot so these Problems are not new for me but I am unabale to solve this one.
I am currently trying to migrate my Ionic3 project to Ionic4.
To do this I have created a new Ionic4 tabs project.
Every time I try the Ionic serve command I am getting:
[ng] An unhandled exception occurred: Unknown browser query
basedir=$(dirname "$(echo "$0" | sed -e 's
Maybe you are using old Browserslist or made typo in query.
[ng] See "C:\Users\Admin\AppData\Local\Temp\ng-9er5Id\angular-errors.log" for further details.
[ERROR] ng has unexpectedly closed (exit code 127).
The Log file:
[error] BrowserslistError: Unknown browser query `basedir=$(dirname "$(echo "$0" | sed -e 's`. Maybe you are using old Browserslist or made typo in query.
at unknownQuery (D:\Wisex\Technik\Client\safehome_client\node_modules\browserslist\index.js:204:10)
at D:\Wisex\Technik\Client\safehome_client\node_modules\browserslist\index.js:296:11
at Array.reduce (<anonymous>)
at resolve (D:\Wisex\Technik\Client\safehome_client\node_modules\browserslist\index.js:237:18)
at browserslist (D:\Wisex\Technik\Client\safehome_client\node_modules\browserslist\index.js:361:16)
at new BuildBrowserFeatures (D:\Wisex\Technik\Client\safehome_client\node_modules\#angular-devkit\build-angular\src\utils\build-browser-features.js:17:35)
at generateWebpackConfig (D:\Wisex\Technik\Client\safehome_client\node_modules\#angular-devkit\build-angular\src\utils\webpack-browser-config.js:24:34)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Does anyone of you have an possible solution for this.
I am really greatful for help cause I takes my days to migrate by now.
Yours,
Benjamin
Do you have the last version of the angular cli?
npm install -g #angular/cli
It might also be useful to post the log
I have spent several hours to fix this .Hope it will help someone
Kindly follow the below steps:
find your npm path from the environmental variable. And copy that path and paste it in notepad
2.Go to control panel ->uninstall the node js
3.after uninstalling,restart the system.
4.Now go to npm path in file explorer.
5.And delete the folder named npm and npm-cache
6.And now install the node(LTS version) and angular(refer from the below link for step by step installation)
https://www.zeolearn.com/magazine/setup-angular-windows
note:Dont run the cmd as administrator.Unless ,the installation fails
7.Once you verified that angular is running fine using ng serve -o
8.Install the ionic by npm install -g ionic#latest
9.And run ionic serve.
10.Hope it helps.Happy coding :)

Ionic config directory error. (How to solve)

I have a issue using ionic on my mac. I've cloned my repo and started it with ionic serve. But if I use control C and stop the command ant start it again I get this error "Cannot read property 'IONIC_CONFIG_DIRECTORY' of undefined".
Same problem here. Found the solution: https://forum.ionicframework.com/t/ionic-commands-not-working-after-update-ionic/146492/3
Solution:
npm uninstall ionic cordova
npm install ionic cordova

Error: Cannot find module 'semver'

I was working on a simple Ionic App.
Steps taken:
updated ionic - OK
started new project - OK
created a couple of pages- OK
served the app - OK
but then I tried to add the android platform:
ionic platform add android
and got this error:
ERROR: Cannot find module 'semver'
at Function.Module._resolveFilename (module.js:336:15)
Caught exception:
undefined
Any idea on why I'm getting this error and how to fix it?
Thanks!
i faced same issue and i fix with below coment
sudo rm -rf node_modules/ package-lock.json
Looks like you're just missing a node module dependency. Try running npm install semver inside your project dir.

Ionic push plugin error in installation

When i tried to add ionic push plugin using
ionic plugin add https://github.com/phonegap-build/PushPlugin.git
i got following error in command promp
Updated the hooks directory to have execute permissions Fetching plugin "https://github.com/phonegap-build/PushPlugin.git" via git clone Repository "https://github.com/phonegap-build/PushPlugin.git" checked out to git ref "master". shell.js: internal error Error: EXDEV, cross-device link not permitted 'C:\Users\A-25\AppData\Local\Temp\git\1438839071751\Example'
at Error (native)
at Object.fs.renameSync (fs.js:636:18)
at C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:77:8 at Array.forEach (native)
at Object._mv (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\mv.js:53:11)at Object.mv (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\shelljs\src\common.js:186:23)
at C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\util\plugins.js:53:19
at _fulfilled (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\A-25\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:749:13)
can anybody tell me what's the problem?
i just downgrade my cordova version to 5.0.0 and it works
Without downgrading your cordova version you could try this
ionic plugin add cordova-plugin-push-notification
I had a similar question:
From an official blog post, Cordova is moving their plugins to npm.
I had the same problem with the ionic plugin add ... command that Mudasser mentioned. So, I installed it easily now with npm:
npm install phonegap-plugin-push