Cannot resolve directory '@angular/http' Beta 1
- OS. Windows 7 Enterprise
- Versions angular-cli: 1.0.0-beta.1 node: 5.10.1 os: win32 x64
- Repro steps. generated a new app and then a service, added "import { Http,Response } from '@angular/http';", WebStorm shows that it cannot resolve the directory.
- From system-config.ts
const barrels: string[] = [
// Angular specific barrels.
'@angular/core',
'@angular/common',
'@angular/compiler',
'@angular/http',
'@angular/router',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
added "@angular/http": "2.0.0-rc.1" to package.json and ran npm install. Now it works. Need to update package.json
I've been trying to get a PR done for just this thing. https://github.com/angular/angular-cli/pull/679
Possibly related? #612
Also #685
I'm going to commit https://github.com/angular/angular-cli/pull/635 to fix this. I kinda agree with http being part of the base install, but it's a slippery slope; we're going to have a lot of those packages in the angular org and we don't want to include them all in the packages (since most people wouldn't care about them).
IMO http should get an exception as it's fairly close to Angular. We might revisit later on.
Closed with #635 .
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.