Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70424

Why Installation of a new module show 'npm ERR! Invalid package name "@angular/common/http": name can only contain URL-friendly characters'?

$
0
0

@anespa wrote:

Dear Friends,
As suggest in tutorial how to install http client module in url: Angular - How to use HttpClientModule? , I edited my package.json as

“dependencies”: {
"@angular/common": “4.0.0”,
"@angular/compiler": “4.0.0”,
"@angular/compiler-cli": “4.0.0”,
"@angular/core": “4.0.0”,
"@angular/forms": “4.0.0”,
"@angular/common/http": “4.3.0”,
"@angular/platform-browser": “4.0.0”,
"@angular/platform-browser-dynamic": “4.0.0”,
"@ionic-native/core": “3.4.2”,
"@ionic-native/splash-screen": “3.4.2”,
"@ionic-native/status-bar": “3.4.2”,
"@ionic/storage": “2.0.1”,
“cordova-android”: “7.0.0”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.1”,
“cordova-plugin-whitelist”: “^1.3.1”,
“ionic-angular”: “3.0.1”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“leaflet”: “^1.0.3”,
“rxjs”: “5.1.1”,
“sw-toolbox”: “3.4.0”,
“zone.js”: “^0.8.4”
},

by changing “@angular/common/http”: “4.3.0”, instead of “@angular/http”: “4.0.0”,

But on running $ npm install

I got error as

user@acer:~/dreamhouse-mobile-ionic$ npm install
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name “@angular/common/http”: name can only contain URL-friendly characters

npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2018-01-11T05_02_18_089Z-debug.log

Any body please advise , how I can rectify this problem and install the module successfully…/

Thanks

Anes

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>