我在角度上是新手,但我会尽力使它起作用。 我已经安装了我需要的大多数东西。
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.2.3
Node: 10.10.0
OS: linux x64
Angular: 6.1.9
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.8.3
@angular-devkit/build-angular 0.8.3
@angular-devkit/build-optimizer 0.8.3
@angular-devkit/build-webpack 0.8.3
@angular-devkit/core 0.8.3
@angular-devkit/schematics 0.8.3
@angular/cdk 6.4.7
@angular/cli 6.2.3
@angular/material 6.4.7
@angular/tsc-wrapped 0.5.2
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.2.3
@schematics/angular 0.8.3
@schematics/update 0.8.3
rxjs 6.3.3
typescript 2.9.2
webpack 4.20.2
我已经设法解决了大多数错误,但还剩下一些错误 当我打开localhost:4200时,我只能看到无法获取/
ng服务
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** 13% building modules 27/28 modules 1 active /src/styles.cssUnknown error from PostCSS plugin. Your current PostCSS version is 7.0.4, but postcss-import uses
6.0.23. Perhaps this is the source of the error below.
ERROR in ./src/styles.css (./node_modules/raw-loader!./node_modules/postcss-loader/src??embedded!./src/styles.css)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
Error: Can't resolve '@angular/material/core/theming/prebuilt/deeppurple-amber.css' in '/src'
at doResolve (/node_modules/enhanced-resolve/lib/Resolver.js:180:19)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
at resolver.doResolve (/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
at resolver.doResolve (/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn5 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:57:1)
at resolver.doResolve (/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:23:37)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn0 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
at hook.callAsync (/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
at _fn1 (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:24:1)
ERROR in src/app/app-directives/simplebtn.directive.spec.ts(6,1): error TS2304: Cannot find name 'describe'.
这是src / styles.css文件,我曾尝试对其进行更改,但仍然存在相同的错误。
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
@import '../node_modules/angular2-notifier/styles/style.css';
@import "~rangeslider.js/dist/rangeslider.css";
@import "~nouislider/d/nouislider.min.css";
body{
background-color: rgba(190, 208, 216, 0.9);
width: 100%;
height: 100%;
}
html, body{
height: 100%;
margin: 0;
padding: 0;
overflow-y: scroll;
}
答案 0 :(得分:0)
请更新您的全局角度cli,然后再次执行最新操作,并检查您的nodejs和npm是最新的,您的问题应得到解决。