【发布时间】:2017-07-28 21:30:59
【问题描述】:
我在安装 npm 时收到此错误
npm WARN @angular/animations@4.3.2 需要 @angular/core@4.3.2 的对等体,但没有安装。
我在 npm start 上得到了这个
node_modules/@angular/platform-browser/animations/src/providers.d.ts(8,119): 错误 TS2305: Module '"E:/Angular/quickstart-master1/quickstart-master/node_modules/@ angular/animations/browser"' 没有导出成员 'ɵDomAnimationEngine'。
这就是我得到的 ng -v
Unable to find "@angular/cli" in devDependencies.
Please take the following steps to avoid issues:
"npm install --save-dev @angular/cli@latest"
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.2.1
node: 6.11.1
os: win32 x64
@angular/animations: 4.3.2
@angular/common: 4.0.3
@angular/compiler: 4.0.3
@angular/core: 4.0.3
@angular/forms: 4.0.3
@angular/http: 4.0.3
@angular/platform-browser: 4.0.3
@angular/platform-browser-dynamic: 4.0.3
@angular/router: 4.0.3
【问题讨论】:
-
您正在尝试运行 Angular Animations 的 4.3.2 版本和 Angular 其余部分的 4.0.3 版本。您应该全面运行相同的版本。
-
嗨@Hanan Ur Rehman,你能告诉我像@angular/animation、@angular/core、@angular/forms、@angular/compiler和@angular/router这样的角度库的稳定版本吗对于 angular7
标签: angular animation npm-install