ng-alain启动不了。

发布于 2022-09-11 17:37:28 字数 30867 浏览 9 评论 0

问题描述

按照以下顺序安装ng-alain,但执行出错(google debug tool 的输出)
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
core.js:15713 ERROR Error: Uncaught (in promise): SyntaxError: Unexpected token u in JSON at position 0
SyntaxError: Unexpected token u in JSON at position 0

at JSON.parse (<anonymous>)
at LocalStorageStore.push../node_modules/@delon/auth/fesm5/auth.js.LocalStorageStore.get (auth.js:90)
at TokenService.push../node_modules/@delon/auth/fesm5/auth.js.TokenService.get (auth.js:198)
at SimpleGuard.push../node_modules/@delon/auth/fesm5/auth.js.SimpleGuard.process (auth.js:976)
at SimpleGuard.push../node_modules/@delon/auth/fesm5/auth.js.SimpleGuard.canActivate (auth.js:1034)
at router.js:3103
at Observable._subscribe (defer.js:9)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe (Observable.js:43)
at Observable.push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe (Observable.js:29)
at TakeOperator.push../node_modules/rxjs/_esm5/internal/operators/take.js.TakeOperator.call (take.js:24)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17279)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
at invokeTask (zone.js:1744)

defaultErrorLogger @ core.js:15713
push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:15761
next @ core.js:17760
schedulerFn @ core.js:13504
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:196
push../node_modules/rxjs/_esm5/internal/Subscriber.js.SafeSubscriber.next @ Subscriber.js:134
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._next @ Subscriber.js:77
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
push../node_modules/rxjs/_esm5/internal/Subject.js.Subject.next @ Subject.js:47
push../node_modules/@angular/core/fesm5/core.js.EventEmitter.emit @ core.js:13488
(anonymous) @ core.js:17310
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push../node_modules/@angular/core/fesm5/core.js.NgZone.runOutsideAngular @ core.js:17247
onHandleError @ core.js:17310
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.handleError @ zone.js:395
push../node_modules/zone.js/dist/zone.js.Zone.runGuarded @ zone.js:164
_loop_1 @ zone.js:694
api.microtaskDrainDone @ zone.js:703
drainMicroTaskQueue @ zone.js:608
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:502
invokeTask @ zone.js:1744
globalZoneAwareCallback @ zone.js:1781
error (async)
customScheduleGlobal @ zone.js:1883
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:410
onScheduleTask @ zone.js:301
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:404
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238
push../node_modules/zone.js/dist/zone.js.Zone.scheduleEventTask @ zone.js:264
(anonymous) @ zone.js:2054
(anonymous) @ http.js:1621
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29
push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call @ mergeMap.js:29
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24
push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchOperator.call @ catchError.js:18
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24
(anonymous) @ subscribeTo.js:21
subscribeToResult @ subscribeToResult.js:11
push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._innerSub @ mergeMap.js:74
push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._tryNext @ mergeMap.js:68
push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapSubscriber._next @ mergeMap.js:51
push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.next @ Subscriber.js:54
(anonymous) @ scalar.js:5
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable._trySubscribe @ Observable.js:43
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:29
push../node_modules/rxjs/_esm5/internal/operators/mergeMap.js.MergeMapOperator.call @ mergeMap.js:29
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24
push../node_modules/rxjs/_esm5/internal/operators/filter.js.FilterOperator.call @ filter.js:15
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24
push../node_modules/rxjs/_esm5/internal/operators/map.js.MapOperator.call @ map.js:18
push../node_modules/rxjs/_esm5/internal/Observable.js.Observable.subscribe @ Observable.js:24
push../src/app/core/startup/startup.service.ts.StartupService.viaMockI18n @ startup.service.ts:74
(anonymous) @ startup.service.ts:138
ZoneAwarePromise @ zone.js:910
push../src/app/core/startup/startup.service.ts.StartupService.load @ startup.service.ts:134
(anonymous) @ app.module.ts:76
push../node_modules/@angular/core/fesm5/core.js.ApplicationInitStatus.runInitializers @ core.js:16728
(anonymous) @ core.js:17763
_callAndReportToErrorHandler @ core.js:17856
(anonymous) @ core.js:17761
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.js:17288
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:390
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
push../node_modules/@angular/core/fesm5/core.js.NgZone.run @ core.js:17202
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModuleFactory @ core.js:17752
(anonymous) @ core.js:17792
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150
(anonymous) @ zone.js:889
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:195
drainMicroTaskQueue @ zone.js:601
Promise.then (async)
scheduleMicroTask @ zone.js:584
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.scheduleTask @ zone.js:413
push../node_modules/zone.js/dist/zone.js.Zone.scheduleTask @ zone.js:238
push../node_modules/zone.js/dist/zone.js.Zone.scheduleMicroTask @ zone.js:258
scheduleResolveOrReject @ zone.js:879
ZoneAwarePromise.then @ zone.js:1012
push../node_modules/@angular/core/fesm5/core.js.PlatformRef.bootstrapModule @ core.js:17792
bootstrap @ main.ts:17
./src/main.ts @ main.ts:35
webpack_require @ bootstrap:83
0 @ style-icons.ts:17
webpack_require @ bootstrap:83
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ main.js:1
client:148 [WDS] Warnings while compiling.

问题出现的环境背景及自己尝试过哪些方法

windows10环境,自己对Angular的开发还没入门,不知尝试什么好。

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)
对安装的代码没作任何修改,但执行
$ng new my-demo --style less
$ng add ng-alain
时出现警告。
C:Angular>ng new my-demo --style less
? Would you like to add Angular routing? Yes
CREATE my-demo/angular.json (3904 bytes)
CREATE my-demo/package.json (1306 bytes)
CREATE my-demo/README.md (1023 bytes)
CREATE my-demo/tsconfig.json (435 bytes)
CREATE my-demo/tslint.json (1621 bytes)
CREATE my-demo/.editorconfig (246 bytes)
CREATE my-demo/.gitignore (587 bytes)
CREATE my-demo/src/favicon.ico (5430 bytes)
CREATE my-demo/src/index.html (293 bytes)
CREATE my-demo/src/main.ts (372 bytes)
CREATE my-demo/src/polyfills.ts (2841 bytes)
CREATE my-demo/src/styles.less (80 bytes)
CREATE my-demo/src/test.ts (642 bytes)
CREATE my-demo/src/browserslist (388 bytes)
CREATE my-demo/src/karma.conf.js (989 bytes)
CREATE my-demo/src/tsconfig.app.json (166 bytes)
CREATE my-demo/src/tsconfig.spec.json (256 bytes)
CREATE my-demo/src/tslint.json (314 bytes)
CREATE my-demo/src/assets/.gitkeep (0 bytes)
CREATE my-demo/src/environments/environment.prod.ts (51 bytes)
CREATE my-demo/src/environments/environment.ts (662 bytes)
CREATE my-demo/src/app/app-routing.module.ts (245 bytes)
CREATE my-demo/src/app/app.module.ts (393 bytes)
CREATE my-demo/src/app/app.component.html (1152 bytes)
CREATE my-demo/src/app/app.component.spec.ts (1098 bytes)
CREATE my-demo/src/app/app.component.ts (212 bytes)
CREATE my-demo/src/app/app.component.less (0 bytes)
CREATE my-demo/e2e/protractor.conf.js (752 bytes)
CREATE my-demo/e2e/tsconfig.e2e.json (213 bytes)
CREATE my-demo/e2e/src/app.e2e-spec.ts (619 bytes)
CREATE my-demo/e2e/src/app.po.ts (251 bytes)
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.

node-sass@4.11.0 install C:Angularmy-demonode_modulesnode-sass
node scripts/install.js

Cached binary found at C:Usersketsu-cAppDataRoamingnpm-cachenode-sass4.11.0win32-x64-67_binding.node

node-sass@4.11.0 postinstall C:Angularmy-demonode_modulesnode-sass
node scripts/build.js

Binary found at C:Angularmy-demonode_modulesnode-sassvendorwin32-x64-67binding.node
Testing binary
Binary is fine
npm WARN rollback Rolling back readable-stream@2.3.6 failed (this is probably harmless): EPERM: operation not permitted, lstat 'C:Angularmy-demonode_modulesfseventsnode_modules'
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 1113 packages from 1025 contributors and audited 41386 packages in 80.034s
found 0 vulnerabilities

warning: LF will be replaced by CRLF in .editorconfig.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in angular.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/protractor.conf.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/src/app.e2e-spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/src/app.po.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/tsconfig.e2e.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package-lock.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app-routing.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/browserslist.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/environments/environment.prod.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/environments/environment.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/karma.conf.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/main.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/polyfills.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/styles.less.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/test.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/tsconfig.app.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/tsconfig.spec.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/tslint.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tslint.json.
The file will have its original line endings in your working directory

Successfully initialized git.

C:Angular>cd my-demo

C:Angularmy-demo>ng add ng-alain
Installing packages for tooling via npm.
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • ng-alain@7.0.0-rc.6

added 1 package from 1 contributor and audited 41387 packages in 11.499s
found 0 vulnerabilities

Installed packages for tooling via npm.
? Which default language would you like to use? 简体中文
? Would you like to add hmr plugin? (default: Y) Yes
? Would you like to add code style plugin? (default: Y) Yes
? Would you like to add dynamic form (sf component) plugin? (default: Y) Yes
? Would you like to add mock plugin? (default: Y) Yes
? Would you like to add i18n plugin? (default: N) Yes
? Would you like to add g2 chart plugin? (default: N) Yes
Start installing dependencies, please wait...
DELETE src/app/app.component.spec.ts
DELETE src/app/app.component.html
DELETE src/app/app.component.less
CREATE src/style-icons-auto.ts (1875 bytes)
CREATE src/style-icons.ts (277 bytes)
CREATE src/typings.d.ts (223 bytes)
CREATE src/app/delon.module.ts (2612 bytes)
CREATE src/app/core/core.module.ts (380 bytes)
CREATE src/app/core/index.ts (162 bytes)
CREATE src/app/core/module-import-guard.ts (269 bytes)
CREATE src/app/core/README.md (137 bytes)
CREATE src/app/core/i18n/i18n.service.spec.ts (2163 bytes)
CREATE src/app/core/i18n/i18n.service.ts (3303 bytes)
CREATE src/app/core/net/default.interceptor.ts (4899 bytes)
CREATE src/app/core/startup/startup.service.ts (4515 bytes)
CREATE src/app/layout/layout.module.ts (2067 bytes)
CREATE src/app/layout/default/default.component.html (319 bytes)
CREATE src/app/layout/default/default.component.ts (2957 bytes)
CREATE src/app/layout/default/header/header.component.html (2338 bytes)
CREATE src/app/layout/default/header/header.component.ts (566 bytes)
CREATE src/app/layout/default/header/index.md (471 bytes)
CREATE src/app/layout/default/header/components/fullscreen.component.ts (697 bytes)
CREATE src/app/layout/default/header/components/i18n.component.ts (1800 bytes)
CREATE src/app/layout/default/header/components/icon.component.ts (2164 bytes)
CREATE src/app/layout/default/header/components/notify.component.ts (6075 bytes)
CREATE src/app/layout/default/header/components/search.component.ts (1221 bytes)
CREATE src/app/layout/default/header/components/storage.component.ts (760 bytes)
CREATE src/app/layout/default/header/components/task.component.ts (3492 bytes)
CREATE src/app/layout/default/header/components/user.component.ts (1639 bytes)
CREATE src/app/layout/default/setting-drawer/setting-drawer-item.component.html (940 bytes)
CREATE src/app/layout/default/setting-drawer/setting-drawer-item.component.ts (583 bytes)
CREATE src/app/layout/default/setting-drawer/setting-drawer.component.html (3869 bytes)
CREATE src/app/layout/default/setting-drawer/setting-drawer.component.ts (8140 bytes)
CREATE src/app/layout/default/sidebar/sidebar.component.html (758 bytes)
CREATE src/app/layout/default/sidebar/sidebar.component.ts (341 bytes)
CREATE src/app/layout/fullscreen/fullscreen.component.html (32 bytes)
CREATE src/app/layout/fullscreen/fullscreen.component.ts (236 bytes)
CREATE src/app/layout/passport/passport.component.html (635 bytes)
CREATE src/app/layout/passport/passport.component.less (1502 bytes)
CREATE src/app/layout/passport/passport.component.ts (393 bytes)
CREATE src/app/routes/routes-routing.module.ts (2597 bytes)
CREATE src/app/routes/routes.module.ts (1090 bytes)
CREATE src/app/routes/callback/callback.component.ts (912 bytes)
CREATE src/app/routes/dashboard/dashboard.component.html (108 bytes)
CREATE src/app/routes/dashboard/dashboard.component.ts (315 bytes)
CREATE src/app/routes/exception/403.component.ts (337 bytes)
CREATE src/app/routes/exception/404.component.ts (337 bytes)
CREATE src/app/routes/exception/500.component.ts (337 bytes)
CREATE src/app/routes/exception/exception-routing.module.ts (710 bytes)
CREATE src/app/routes/exception/exception.module.ts (745 bytes)
CREATE src/app/routes/exception/trigger.component.ts (510 bytes)
CREATE src/app/routes/passport/lock/lock.component.html (1067 bytes)
CREATE src/app/routes/passport/lock/lock.component.less (184 bytes)
CREATE src/app/routes/passport/lock/lock.component.ts (1122 bytes)
CREATE src/app/routes/passport/login/login.component.html (3994 bytes)
CREATE src/app/routes/passport/login/login.component.less (835 bytes)
CREATE src/app/routes/passport/login/login.component.ts (5353 bytes)
CREATE src/app/routes/passport/register/register.component.html (4978 bytes)
CREATE src/app/routes/passport/register/register.component.less (679 bytes)
CREATE src/app/routes/passport/register/register.component.ts (3431 bytes)
CREATE src/app/routes/passport/register-result/register-result.component.html (552 bytes)
CREATE src/app/routes/passport/register-result/register-result.component.ts (519 bytes)
CREATE src/app/shared/index.ts (98 bytes)
CREATE src/app/shared/shared.module.ts (1432 bytes)
CREATE src/app/shared/json-schema/json-schema.module.ts (805 bytes)
CREATE src/app/shared/utils/yuan.ts (323 bytes)
CREATE src/assets/logo-color.svg (2037 bytes)
CREATE src/assets/logo-full.svg (4374 bytes)
CREATE src/assets/logo.svg (2037 bytes)
CREATE src/assets/zorro.svg (2232 bytes)
CREATE src/assets/tmp/app-data.json (9469 bytes)
CREATE src/assets/tmp/i18n/en-US.json (7101 bytes)
CREATE src/assets/tmp/i18n/pl-PL.json (7709 bytes)
CREATE src/assets/tmp/i18n/tr-TR.json (7474 bytes)
CREATE src/assets/tmp/i18n/zh-CN.json (7033 bytes)
CREATE src/assets/tmp/i18n/zh-TW.json (7041 bytes)
CREATE src/assets/tmp/img/1.png (2838 bytes)
CREATE src/assets/tmp/img/2.png (2515 bytes)
CREATE src/assets/tmp/img/3.png (3386 bytes)
CREATE src/assets/tmp/img/4.png (3293 bytes)
CREATE src/assets/tmp/img/5.png (2560 bytes)
CREATE src/assets/tmp/img/6.png (3827 bytes)
CREATE src/assets/tmp/img/avatar.jpg (43173 bytes)
CREATE src/assets/tmp/img/bg1.jpg (647356 bytes)
CREATE src/assets/tmp/img/bg10.jpg (185940 bytes)
CREATE src/assets/tmp/img/bg2.jpg (148219 bytes)
CREATE src/assets/tmp/img/bg3.jpg (360944 bytes)
CREATE src/assets/tmp/img/bg4.jpg (493847 bytes)
CREATE src/assets/tmp/img/bg5.jpg (157930 bytes)
CREATE src/assets/tmp/img/bg6.jpg (453836 bytes)
CREATE src/assets/tmp/img/bg7.jpg (46096 bytes)
CREATE src/assets/tmp/img/bg8.jpg (194653 bytes)
CREATE src/assets/tmp/img/bg9.jpg (64117 bytes)
CREATE src/assets/tmp/img/half-float-bg-1.jpg (108685 bytes)
CREATE src/environments/environment.hmr.ts (682 bytes)
CREATE src/styles/index.less (80 bytes)
CREATE src/styles/theme.less (158 bytes)
CREATE LICENSE (1086 bytes)
CREATE README-zh_CN.md (3949 bytes)
CREATE scripts/color-less.js (779 bytes)
CREATE _mock/index.ts (25 bytes)
CREATE _mock/README.md (38 bytes)
CREATE _mock/_user.ts (3115 bytes)
CREATE .prettierignore (36 bytes)
CREATE .prettierrc (72 bytes)
CREATE .stylelintrc (1021 bytes)
CREATE .vscode/launch.json (459 bytes)
CREATE .vscode/settings.json (379 bytes)
CREATE _cli-tpl/test/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html (27 bytes)
CREATE _cli-tpl/test/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts (854 bytes)
CREATE _cli-tpl/test/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.spec.ts (713 bytes)
CREATE src/hmr.ts (776 bytes)
UPDATE package.json (3432 bytes)
UPDATE angular.json (5504 bytes)
UPDATE tsconfig.json (717 bytes)
UPDATE src/tsconfig.app.json (485 bytes)
UPDATE src/tsconfig.spec.json (557 bytes)
UPDATE tslint.json (2024 bytes)
UPDATE src/tslint.json (433 bytes)
UPDATE src/styles.less (321 bytes)
UPDATE src/app/app.component.ts (1079 bytes)
UPDATE src/app/app.module.ts (3540 bytes)
UPDATE src/environments/environment.prod.ts (103 bytes)
UPDATE src/environments/environment.ts (683 bytes)
UPDATE README.md (3864 bytes)
UPDATE src/main.ts (936 bytes)
UPDATE src/index.html (1665 bytes)
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated @ant-design/icons-angular@2.0.0-beta.1: Release official 2.0.0
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.

husky@1.3.1 install C:Angularmy-demonode_moduleshusky
node husky install

husky > setting up git hooks
husky > done
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd@7.0.0-rc.3 requires a peer of typescript@~3.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN @delon/abc@7.0.0-rc.6 requires a peer of qrious@^4.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN @ant-design/icons-angular@2.0.0-beta.1 requires a peer of typescript@~3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN The package ng-alain is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

added 506 packages from 375 contributors and audited 46025 packages in 65.299s
found 2 vulnerabilities (1 low, 1 moderate)
run npm audit fix to fix them, or npm audit for details
npm WARN @ant-design/icons-angular@2.0.0-beta.1 requires a peer of typescript@~3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @delon/abc@7.0.0-rc.6 requires a peer of qrious@^4.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd@7.0.0-rc.3 requires a peer of typescript@~3.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN The package ng-alain is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 46025 packages in 14.004s
found 2 vulnerabilities (1 low, 1 moderate)
run npm audit fix to fix them, or npm audit for details
npm WARN @ant-design/icons-angular@2.0.0-beta.1 requires a peer of typescript@~3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @delon/abc@7.0.0-rc.6 requires a peer of qrious@^4.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd@7.0.0-rc.3 requires a peer of typescript@~3.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN The package ng-alain is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 46025 packages in 14.578s
found 2 vulnerabilities (1 low, 1 moderate)
run npm audit fix to fix them, or npm audit for details
npm WARN @ant-design/icons-angular@2.0.0-beta.1 requires a peer of typescript@~3.1.3 but none is installed. You must install peer dependencies yourself.
npm WARN @delon/abc@7.0.0-rc.6 requires a peer of qrious@^4.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN ng-zorro-antd@7.0.0-rc.3 requires a peer of typescript@~3.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.
npm WARN The package ng-alain is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 46025 packages in 14.787s
found 2 vulnerabilities (1 low, 1 moderate)
run npm audit fix to fix them, or npm audit for details

C:Angularmy-demo>ng serve
Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/

Date: 2019-02-12T10:05:36.352Z
Hash: 083b5d027b1f6ca89fec
Time: 25739ms
chunk {es2015-polyfills} es2015-polyfills.js, es2015-polyfills.js.map (es2015-polyfills) 284 kB [initial] [rendered]
chunk {exception-exception-module} exception-exception-module.js, exception-exception-module.js.map (exception-exception-module) 12.3 kB [rendered]
chunk {main} main.js, main.js.map (main) 223 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 236 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 8.79 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 1.26 MB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 2.34 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 9.49 MB [initial] [rendered]

WARNING in ./src/styles.less (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/less-loader/dist/cjs.js??ref--15-3!./src/styles.less)
Module Warning (from ./node_modules/postcss-loader/src/index.js):
Warning

(159:3) Replace text-decoration-skip: ink to text-decoration-skip-ink: auto, because spec had been changed
i 「wdm」: Compiled with warnings.
^Cバッチ ジョブを終了しますか (Y/N)? y

C:Angularmy-demo>

你期待的结果是什么?实际看到的错误信息又是什么?

启动完成后会打开浏览器访问 //localhost:4200,希望能见到例题的画面。但画面没有表示任何信息,google debug tool 输出错误信息。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

瑶笙 2022-09-18 17:37:28

遇到同样问题,我用下面的方式解决的
尝试清除 localhost:4200 站点的所有存储数据(包含:cookie, LocalStorge)
参考链接:
https://www.gitmemory.com/issue/ng-alain/ng-alain/1260/514574028

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文