Ionic CLI changing package.json version spec from ~ to ^
See original GitHub issueDescription:
Running ionic cordova run
modifies version constraints of package.json so that all tilde (~) become caret (^)
Steps to Reproduce:
Run ionic cordova run
(either android or ios) in your project directory
Output:
Version constraints on package.json are changed from ~ to ^
My ionic info
:
cli packages: (/Users/seiyoungahn/.npm-global/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : android 6.1.1 ios 4.5.4
Ionic Framework : unknown
System:
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v6.12.3
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Other Information:
This issue is related to #2230.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (4 by maintainers)
Top Results From Across the Web
App Migration Guide: Documentation to Migrate Ionic 4.x to 5.x
The Ionic Migration Guide provides documentation for how to migrate an app from 4.x to 5.x. Read to learn more about what updates...
Read more >ionic 5 conflict package.json - angular - Stack Overflow
finally I solved by installing @ionic-native/core dependency by running npm install --save @ionic-native/core.
Read more >Updating your published package version number - npm Docs
To change the version number in package.json , on the command line, in the package root directory, run the following command, replacing <update_type>...
Read more >HOW TO: Update all npm packages in your project at once
For those in camp TL;DR; write and execute a node script(source below) to rewrite all the versions listed in package.json .
Read more >Platforms and Plugins Version Management - Apache Cordova
json file. It is also possible to add a platform or plugin by editing the package.json file directly, assuming you know the right...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What’s your npm save prefix?
npm config get save-prefix
I created another issue a month ago about platforms being added with ~ in the config.xml but with the save-prefix in package.json (https://issues.apache.org/jira/browse/CB-13729) and at some point they sync the value changing it in the config.xml.
So, if you have
^
as save-prefix, you can set it to~
as a workaroundnpm config set save-prefix='~'
Yeah, that was from preventing the change from
~
to^
on first place, but once it’s changed it doesn’t revert it.